Class: IceCube::Validations::DayOfMonth::Validation
- Inherits:
-
FixedValue
- Object
- FixedValue
- IceCube::Validations::DayOfMonth::Validation
- Defined in:
- lib/ice_cube/validations/day_of_month.rb
Constant Summary
Constants inherited from FixedValue
Instance Attribute Summary collapse
-
#day ⇒ Object
(also: #value)
readonly
Returns the value of attribute day.
Instance Method Summary collapse
- #build_hash(builder) ⇒ Object
- #build_ical(builder) ⇒ Object
- #build_s(builder) ⇒ Object
- #dst_adjust? ⇒ Boolean
-
#initialize(day) ⇒ Validation
constructor
A new instance of Validation.
- #key ⇒ Object
- #type ⇒ Object
Methods inherited from FixedValue
Constructor Details
#initialize(day) ⇒ Validation
Returns a new instance of Validation.
19 20 21 |
# File 'lib/ice_cube/validations/day_of_month.rb', line 19 def initialize(day) @day = day end |
Instance Attribute Details
#day ⇒ Object (readonly) Also known as: value
Returns the value of attribute day.
16 17 18 |
# File 'lib/ice_cube/validations/day_of_month.rb', line 16 def day @day end |
Instance Method Details
#build_hash(builder) ⇒ Object
39 40 41 |
# File 'lib/ice_cube/validations/day_of_month.rb', line 39 def build_hash(builder) builder.validations_array(:day_of_month) << day end |
#build_ical(builder) ⇒ Object
43 44 45 |
# File 'lib/ice_cube/validations/day_of_month.rb', line 43 def build_ical(builder) builder["BYMONTHDAY"] << day end |
#build_s(builder) ⇒ Object
35 36 37 |
# File 'lib/ice_cube/validations/day_of_month.rb', line 35 def build_s(builder) builder.piece(:day_of_month) << StringBuilder.nice_number(day) end |
#dst_adjust? ⇒ Boolean
31 32 33 |
# File 'lib/ice_cube/validations/day_of_month.rb', line 31 def dst_adjust? true end |
#key ⇒ Object
23 24 25 |
# File 'lib/ice_cube/validations/day_of_month.rb', line 23 def key :day_of_month end |
#type ⇒ Object
27 28 29 |
# File 'lib/ice_cube/validations/day_of_month.rb', line 27 def type :day end |