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

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

Constant Summary

Constants inherited from FixedValue

FixedValue::INTERVALS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from FixedValue

#validate

Constructor Details

#initialize(minute) ⇒ Validation

Returns a new instance of Validation.



33
34
35
# File 'lib/ice_cube/validations/minute_of_hour.rb', line 33

def initialize(minute)
  @minute = minute
end

Instance Attribute Details

#minuteObject (readonly) Also known as: value

Returns the value of attribute minute.



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

def minute
  @minute
end

Instance Method Details

#build_hash(builder) ⇒ Object



53
54
55
# File 'lib/ice_cube/validations/minute_of_hour.rb', line 53

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

#build_ical(builder) ⇒ Object



57
58
59
# File 'lib/ice_cube/validations/minute_of_hour.rb', line 57

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

#build_s(builder) ⇒ Object



49
50
51
# File 'lib/ice_cube/validations/minute_of_hour.rb', line 49

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

#dst_adjust?Boolean

Returns:

  • (Boolean)


45
46
47
# File 'lib/ice_cube/validations/minute_of_hour.rb', line 45

def dst_adjust?
  false
end

#keyObject



37
38
39
# File 'lib/ice_cube/validations/minute_of_hour.rb', line 37

def key
  :minute_of_hour
end

#typeObject



41
42
43
# File 'lib/ice_cube/validations/minute_of_hour.rb', line 41

def type
  :min
end