Class: Sail::Types::Type

Inherits:
Object
  • Object
show all
Defined in:
lib/sail/types/type.rb

Overview

Type

This is the base class all types inherit from. It is an abstract class not supposed to be instantiated.

Direct Known Subclasses

Array, Boolean, Cron, Date, Float, Integer, ObjModel, String, Throttle, Uri

Instance Method Summary collapse

Constructor Details

#initialize(setting) ⇒ Type

Returns a new instance of Type.



11
12
13
# File 'lib/sail/types/type.rb', line 11

def initialize(setting)
  @setting = setting
end

Instance Method Details

#from(value) ⇒ Object



19
20
21
# File 'lib/sail/types/type.rb', line 19

def from(value)
  value
end

#to_valueObject



15
16
17
# File 'lib/sail/types/type.rb', line 15

def to_value
  @setting.value.to_s
end