Class: IceCube::Validations::SecondOfMinute::Validation
- Inherits:
-
Object
- Object
- IceCube::Validations::SecondOfMinute::Validation
- Includes:
- Lock
- Defined in:
- lib/ice_cube/validations/second_of_minute.rb
Constant Summary
Constants included from Lock
Instance Attribute Summary collapse
-
#second ⇒ Object
(also: #value)
readonly
Returns the value of attribute second.
Instance Method Summary collapse
- #build_hash(builder) ⇒ Object
- #build_ical(builder) ⇒ Object
- #build_s(builder) ⇒ Object
-
#initialize(second) ⇒ Validation
constructor
A new instance of Validation.
- #type ⇒ Object
Methods included from Lock
Constructor Details
#initialize(second) ⇒ Validation
Returns a new instance of Validation.
25 26 27 |
# File 'lib/ice_cube/validations/second_of_minute.rb', line 25 def initialize(second) @second = second end |
Instance Attribute Details
#second ⇒ Object (readonly) Also known as: value
Returns the value of attribute second.
22 23 24 |
# File 'lib/ice_cube/validations/second_of_minute.rb', line 22 def second @second end |
Instance Method Details
#build_hash(builder) ⇒ Object
37 38 39 |
# File 'lib/ice_cube/validations/second_of_minute.rb', line 37 def build_hash(builder) builder.validations_array(:second_of_minute) << second end |
#build_ical(builder) ⇒ Object
41 42 43 |
# File 'lib/ice_cube/validations/second_of_minute.rb', line 41 def build_ical(builder) builder['BYSECOND'] << second end |
#build_s(builder) ⇒ Object
33 34 35 |
# File 'lib/ice_cube/validations/second_of_minute.rb', line 33 def build_s(builder) builder.piece(:second_of_minute) << StringBuilder.nice_number(second) end |
#type ⇒ Object
29 30 31 |
# File 'lib/ice_cube/validations/second_of_minute.rb', line 29 def type :sec end |