Class: Confidante::Converters::EvaluatingConverter
- Inherits:
-
Object
- Object
- Confidante::Converters::EvaluatingConverter
- Defined in:
- lib/confidante/converters/evaluating_converter.rb
Instance Method Summary collapse
- #convert(thing) ⇒ Object
-
#initialize ⇒ EvaluatingConverter
constructor
A new instance of EvaluatingConverter.
Constructor Details
#initialize ⇒ EvaluatingConverter
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 |