Class: IceCube::Validations::HourOfDay::Validation
- Inherits:
-
Object
- Object
- IceCube::Validations::HourOfDay::Validation
- Includes:
- Lock
- Defined in:
- lib/ice_cube/validations/hour_of_day.rb
Constant Summary
Constants included from Lock
Instance Attribute Summary collapse
-
#hour ⇒ Object
(also: #value)
readonly
Returns the value of attribute hour.
Instance Method Summary collapse
- #build_hash(builder) ⇒ Object
- #build_ical(builder) ⇒ Object
- #build_s(builder) ⇒ Object
-
#initialize(hour) ⇒ Validation
constructor
A new instance of Validation.
- #type ⇒ Object
Methods included from Lock
Constructor Details
#initialize(hour) ⇒ Validation
Returns a new instance of Validation.
28 29 30 |
# File 'lib/ice_cube/validations/hour_of_day.rb', line 28 def initialize(hour) @hour = hour end |
Instance Attribute Details
#hour ⇒ Object (readonly) Also known as: value
Returns the value of attribute hour.
25 26 27 |
# File 'lib/ice_cube/validations/hour_of_day.rb', line 25 def hour @hour end |
Instance Method Details
#build_hash(builder) ⇒ Object
40 41 42 |
# File 'lib/ice_cube/validations/hour_of_day.rb', line 40 def build_hash(builder) builder.validations_array(:hour_of_day) << hour end |
#build_ical(builder) ⇒ Object
44 45 46 |
# File 'lib/ice_cube/validations/hour_of_day.rb', line 44 def build_ical(builder) builder['BYHOUR'] << hour end |
#build_s(builder) ⇒ Object
32 33 34 |
# File 'lib/ice_cube/validations/hour_of_day.rb', line 32 def build_s(builder) builder.piece(:hour_of_day) << StringBuilder.nice_number(hour) end |
#type ⇒ Object
36 37 38 |
# File 'lib/ice_cube/validations/hour_of_day.rb', line 36 def type :hour end |