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

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

Returns a new instance of Validation.



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

def initialize(type)
  @type = type
end

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end

#valueObject (readonly)

Returns the value of attribute value.



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

def value
  @value
end

Instance Method Details

#build_hash(builder) ⇒ Object

no -op



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

def build_hash(builder)
end

#build_ical(builder) ⇒ Object

no -op



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

def build_ical(builder)
end

#build_s(builder) ⇒ Object

no -op



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

def build_s(builder)
end

#dst_adjust?Boolean

Returns:

  • (Boolean)


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

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