Class: Reflekt::ArrayMeta
Instance Method Summary collapse
-
#initialize ⇒ ArrayMeta
constructor
A new instance of ArrayMeta.
- #load(value) ⇒ Object
- #serialize ⇒ Object
Methods inherited from Meta
Constructor Details
#initialize ⇒ ArrayMeta
Returns a new instance of ArrayMeta.
6 7 8 9 10 11 |
# File 'lib/meta/array_meta.rb', line 6 def initialize() @type = :array @min = nil @max = nil @length = nil end |
Instance Method Details
#load(value) ⇒ Object
16 17 18 19 20 |
# File 'lib/meta/array_meta.rb', line 16 def load(value) @min = value.min() @max = value.max() @length = value.length() end |
#serialize ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/meta/array_meta.rb', line 22 def serialize() { :type => @type, :max => @max, :min => @min, :length => @length } end |