Class: IceCube::Validations::ScheduleLock::Validation

Inherits:
FixedValue
  • Object
show all
Defined in:
lib/ice_cube/validations/schedule_lock.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(type) ⇒ Validation

Returns a new instance of Validation.



16
17
18
# File 'lib/ice_cube/validations/schedule_lock.rb', line 16

def initialize(type)
  @type = type
end

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type.



14
15
16
# File 'lib/ice_cube/validations/schedule_lock.rb', line 14

def type
  @type
end

#valueObject (readonly)

Returns the value of attribute value.



14
15
16
# File 'lib/ice_cube/validations/schedule_lock.rb', line 14

def value
  @value
end

Instance Method Details

#build_hash(builder) ⇒ Object

no -op



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

def build_hash(builder)
end

#build_ical(builder) ⇒ Object

no -op



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

def build_ical(builder)
end

#build_s(builder) ⇒ Object

no -op



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

def build_s(builder)
end

#dst_adjust?Boolean

Returns:

  • (Boolean)


24
25
26
27
28
29
# File 'lib/ice_cube/validations/schedule_lock.rb', line 24

def dst_adjust?
  case @type
  when :sec, :min then false
  else true
  end
end

#keyObject



20
21
22
# File 'lib/ice_cube/validations/schedule_lock.rb', line 20

def key
  :base
end