Class: CloudRailSi::ServiceCode::Stringify

Inherits:
Object
  • Object
show all
Defined in:
lib/cloudrail_si/servicecode/commands/json/Stringify.rb

Instance Method Summary collapse

Instance Method Details

#execute(environment, parameters) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/cloudrail_si/servicecode/commands/json/Stringify.rb', line 11

def execute(environment, parameters)
    Helper.assert(parameters.length == 2 &&
                  Helper.is_var_address(parameters[0]))
    result_var = parameters[0]
    input = Helper.resolve(environment, parameters[1])
    str = input.to_json
    environment.set_variable(result_var, str)
end

#get_identifierObject



7
8
9
# File 'lib/cloudrail_si/servicecode/commands/json/Stringify.rb', line 7

def get_identifier
    return 'json.stringify'
end