Class: IceCube::Validations::HourOfDay::Validation
- Inherits:
-
FixedValue
- Object
- FixedValue
- IceCube::Validations::HourOfDay::Validation
- Defined in:
- lib/ice_cube/validations/hour_of_day.rb
Constant Summary
Constants inherited from FixedValue
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
- #dst_adjust? ⇒ Boolean
-
#initialize(hour) ⇒ Validation
constructor
A new instance of Validation.
- #key ⇒ Object
- #type ⇒ Object
Methods inherited from FixedValue
Constructor Details
#initialize(hour) ⇒ Validation
Returns a new instance of Validation.
38 39 40 |
# File 'lib/ice_cube/validations/hour_of_day.rb', line 38 def initialize(hour) @hour = hour end |
Instance Attribute Details
#hour ⇒ Object (readonly) Also known as: value
Returns the value of attribute hour.
35 36 37 |
# File 'lib/ice_cube/validations/hour_of_day.rb', line 35 def hour @hour end |
Instance Method Details
#build_hash(builder) ⇒ Object
58 59 60 |
# File 'lib/ice_cube/validations/hour_of_day.rb', line 58 def build_hash(builder) builder.validations_array(:hour_of_day) << hour end |
#build_ical(builder) ⇒ Object
62 63 64 |
# File 'lib/ice_cube/validations/hour_of_day.rb', line 62 def build_ical(builder) builder["BYHOUR"] << hour end |
#build_s(builder) ⇒ Object
54 55 56 |
# File 'lib/ice_cube/validations/hour_of_day.rb', line 54 def build_s(builder) builder.piece(:hour_of_day) << StringBuilder.nice_number(hour) end |
#dst_adjust? ⇒ Boolean
50 51 52 |
# File 'lib/ice_cube/validations/hour_of_day.rb', line 50 def dst_adjust? true end |
#key ⇒ Object
42 43 44 |
# File 'lib/ice_cube/validations/hour_of_day.rb', line 42 def key :hour_of_day end |
#type ⇒ Object
46 47 48 |
# File 'lib/ice_cube/validations/hour_of_day.rb', line 46 def type :hour end |