Class: Superstore::Types::BaseType
- Inherits:
-
Object
- Object
- Superstore::Types::BaseType
- Defined in:
- lib/superstore/types/base_type.rb
Direct Known Subclasses
ArrayType, BooleanType, DateType, FloatType, IntegerType, JsonType, StringType, TimeType
Instance Attribute Summary collapse
-
#model ⇒ Object
Returns the value of attribute model.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #decode(str) ⇒ Object
- #encode(value) ⇒ Object
-
#initialize(model, options = {}) ⇒ BaseType
constructor
A new instance of BaseType.
- #typecast(value) ⇒ Object
Constructor Details
#initialize(model, options = {}) ⇒ BaseType
Returns a new instance of BaseType.
5 6 7 8 |
# File 'lib/superstore/types/base_type.rb', line 5 def initialize(model, = {}) @model = model @options = end |
Instance Attribute Details
#model ⇒ Object
Returns the value of attribute model.
4 5 6 |
# File 'lib/superstore/types/base_type.rb', line 4 def model @model end |
#options ⇒ Object
Returns the value of attribute options.
4 5 6 |
# File 'lib/superstore/types/base_type.rb', line 4 def @options end |
Instance Method Details
#decode(str) ⇒ Object
14 15 16 |
# File 'lib/superstore/types/base_type.rb', line 14 def decode(str) str end |
#encode(value) ⇒ Object
10 11 12 |
# File 'lib/superstore/types/base_type.rb', line 10 def encode(value) value end |
#typecast(value) ⇒ Object
18 19 20 |
# File 'lib/superstore/types/base_type.rb', line 18 def typecast(value) value end |