Class: ArrayMeta

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

Instance Method Summary collapse

Methods inherited from Meta

deserialize

Constructor Details

#initializeArrayMeta

Returns a new instance of ArrayMeta.



5
6
7
8
9
10
11
12
# File 'lib/meta/array_meta.rb', line 5

def initialize()

  @type = :array
  @min = nil
  @max = nil
  @length = nil

end

Instance Method Details

#load(value) ⇒ Object

Parameters:

  • value (Array)


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

def load(value)

  @min = value.min()
  @max = value.max()
  @length = value.length()

end

#serializeObject



25
26
27
28
29
30
31
32
# File 'lib/meta/array_meta.rb', line 25

def serialize()
  {
    :type => @type,
    :max => @max,
    :min => @min,
    :length => @length
  }
end