Class: Sail::Types::Type
- Inherits:
-
Object
- Object
- Sail::Types::Type
- 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, Set, String, Throttle, Uri
Instance Method Summary collapse
- #from(value) ⇒ Object
-
#initialize(setting) ⇒ Type
constructor
A new instance of Type.
- #to_value ⇒ Object
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_value ⇒ Object
15 16 17 |
# File 'lib/sail/types/type.rb', line 15 def to_value @setting.value.to_s end |