module Minutely

A library that provides classes for representing the time of a day by using only hours and minutes.

Constants

VERSION

Public Instance Methods

parse(*args) click to toggle source

Parses the given input and returns a `Minutely::Time` or `nil`, respectively.

@param obj [Minutely::Time, hour, min, Integer, String, nil]

@return [Minutely::Time, nil]

@raise [ArgumentError] when the object does not represent a valid time

# File lib/minutely.rb, line 25
def parse(*args)
  Minutely::Time.parse(*args)
end
parse_range(*args) click to toggle source

Parses the given input and returns a `Minutely::TimeRange` or `nil`, respectively.

@param obj [Minutely::TimeRange, Array, Hash, String, nil]

@return [Minutely::TimeRange, nil]

@raise [ArgumentError] when the object does not represent a valid time range

@raise [KeyError] when the given Hash does not contain the required keys

(`:from` and `:to`)
# File lib/minutely.rb, line 41
def parse_range(*args)
  Minutely::TimeRange.parse(*args)
end