Class: Settingify::Caster

Inherits:
Struct
  • Object
show all
Defined in:
lib/settingify/caster.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



4
5
6
# File 'lib/settingify/caster.rb', line 4

def type
  @type
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



4
5
6
# File 'lib/settingify/caster.rb', line 4

def value
  @value
end

Instance Method Details

#callObject



7
8
9
# File 'lib/settingify/caster.rb', line 7

def call
  type_class.try_convert value
end