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.



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

def initialize(minute)
  @minute = minute
end

Instance Attribute Details

#minuteObject (readonly) Also known as: value

Returns the value of attribute minute.



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

def minute
  @minute
end

Instance Method Details

#build_hash(builder) ⇒ Object



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

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

#build_ical(builder) ⇒ Object



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

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

#build_s(builder) ⇒ Object



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

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

#dst_adjust?Boolean

Returns:

  • (Boolean)


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

def dst_adjust?
  false
end

#keyObject



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

def key
  :minute_of_hour
end

#typeObject



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

def type
  :min
end