Class: Reflekt::FloatMeta

Inherits:
Meta
  • Object
show all
Defined in:
lib/meta/float_meta.rb

Instance Method Summary collapse

Methods inherited from Meta

deserialize, numeric?

Constructor Details

#initializeFloatMeta

Returns a new instance of FloatMeta.



6
7
8
9
# File 'lib/meta/float_meta.rb', line 6

def initialize()
  @type = :float
  @value = nil
end

Instance Method Details

#load(value) ⇒ Object

Parameters:

  • value (Float)


14
15
16
# File 'lib/meta/float_meta.rb', line 14

def load(value)
  @value = value
end

#serializeObject



18
19
20
21
22
23
# File 'lib/meta/float_meta.rb', line 18

def serialize()
  {
    :type => @type,
    :value => @value
  }
end