Class: Confidante::Converters::EvaluatingConverter

Inherits:
Object
  • Object
show all
Defined in:
lib/confidante/converters/evaluating_converter.rb

Instance Method Summary collapse

Constructor Details

#initializeEvaluatingConverter

Returns a new instance of EvaluatingConverter.



8
9
10
11
# File 'lib/confidante/converters/evaluating_converter.rb', line 8

def initialize
  @sandbox = Shikashi::Sandbox.new
  @privileges = Shikashi::Privileges.new
end

Instance Method Details

#convert(thing) ⇒ Object



13
14
15
16
17
18
19
20
21
22
# File 'lib/confidante/converters/evaluating_converter.rb', line 13

def convert(thing)
  case thing
  when Hash
    convert_hash(thing)
  when Array
    convert_array(thing)
  else
    convert_item(thing)
  end
end