Class: IceCube::Validations::MinuteOfHour::Validation

Inherits:
Object
  • Object
show all
Includes:
Lock
Defined in:
lib/ice_cube/validations/minute_of_hour.rb

Constant Summary

Constants included from Lock

Lock::INTERVALS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Lock

#validate

Constructor Details

#initialize(minute) ⇒ Validation

Returns a new instance of Validation.



27
28
29
# File 'lib/ice_cube/validations/minute_of_hour.rb', line 27

def initialize(minute)
  @minute = minute
end

Instance Attribute Details

#minuteObject (readonly) Also known as: value

Returns the value of attribute minute.



24
25
26
# File 'lib/ice_cube/validations/minute_of_hour.rb', line 24

def minute
  @minute
end

Instance Method Details

#build_hash(builder) ⇒ Object



39
40
41
# File 'lib/ice_cube/validations/minute_of_hour.rb', line 39

def build_hash(builder)
  builder.validations_array(:minute_of_hour) << minute
end

#build_ical(builder) ⇒ Object



43
44
45
# File 'lib/ice_cube/validations/minute_of_hour.rb', line 43

def build_ical(builder)
  builder['BYMINUTE'] << minute
end

#build_s(builder) ⇒ Object



31
32
33
# File 'lib/ice_cube/validations/minute_of_hour.rb', line 31

def build_s(builder)
  builder.piece(:minute_of_hour) << StringBuilder.nice_number(minute)
end

#typeObject



35
36
37
# File 'lib/ice_cube/validations/minute_of_hour.rb', line 35

def type
  :min
end