Class: Firecord::Record::Serializer

Inherits:
Object
  • Object
show all
Defined in:
lib/firecord/record/serializer.rb

Instance Method Summary collapse

Constructor Details

#initialize(value, type) ⇒ Serializer

Returns a new instance of Serializer.



4
5
6
7
# File 'lib/firecord/record/serializer.rb', line 4

def initialize(value, type)
  @value = value
  @type = type
end

Instance Method Details

#valueObject



9
10
11
# File 'lib/firecord/record/serializer.rb', line 9

def value
  @value.nil? ? @value : send(@type)
end