Class: StringMeta

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

Instance Method Summary collapse

Constructor Details

#initializeStringMeta

Returns a new instance of StringMeta.



5
6
7
# File 'lib/meta/StringMeta.rb', line 5

def initialize()
  @length = nil
end

Instance Method Details

#load(value) ⇒ Object

Parameters:

  • value (String)


12
13
14
# File 'lib/meta/StringMeta.rb', line 12

def load(value)
  @length = value.length
end

#resultObject



16
17
18
19
20
21
# File 'lib/meta/StringMeta.rb', line 16

def result()
  {
    :type => :string,
    :length => @length
  }
end