Class: Superstore::Types::BaseType

Inherits:
Object
  • Object
show all
Defined in:
lib/superstore/types/base_type.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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, options = {})
  @model   = model
  @options = options
end

Instance Attribute Details

#modelObject

Returns the value of attribute model.



4
5
6
# File 'lib/superstore/types/base_type.rb', line 4

def model
  @model
end

#optionsObject

Returns the value of attribute options.



4
5
6
# File 'lib/superstore/types/base_type.rb', line 4

def options
  @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