Class: CloudRailSi::ServiceCode::StreamToString
- Inherits:
-
Object
- Object
- CloudRailSi::ServiceCode::StreamToString
- Defined in:
- lib/cloudrail_si/servicecode/commands/stream/StreamToString.rb
Instance Method Summary collapse
Instance Method Details
#execute(environment, parameters) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/cloudrail_si/servicecode/commands/stream/StreamToString.rb', line 10 def execute(environment, parameters) Helper.assert(parameters.length == 2 && Helper.is_var_address(parameters[0])) result_var = parameters[0] source = Helper.resolve(environment, parameters[1]) if Helper.is_stream(source) str = Helper.dump_stream(source) else str = source end environment.set_variable(result_var, str) end |
#get_identifier ⇒ Object
6 7 8 |
# File 'lib/cloudrail_si/servicecode/commands/stream/StreamToString.rb', line 6 def get_identifier 'stream.streamToString' end |