Class: Extract::ValueBuilder

Inherits:
Base
  • Object
show all
Defined in:
lib/src/extract/value_builder.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Extract::Base

Instance Method Details

#valueObject



15
16
17
18
19
20
21
22
23
24
# File 'lib/src/extract/value_builder.rb', line 15

def value
  props = node.props
  case props
  when String then value_for_string
  when Array then value_for_array
  when Hash then value_for_hash
  else
    raise "Invalid kind #{props.class} (#{props})"
  end
end