Class: CloudRailSi::ServiceCode::GetMimeType
- Inherits:
-
Object
- Object
- CloudRailSi::ServiceCode::GetMimeType
- Defined in:
- lib/cloudrail_si/servicecode/commands/GetMimeType.rb
Instance Method Summary collapse
Instance Method Details
#execute(environment, parameters) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/cloudrail_si/servicecode/commands/GetMimeType.rb', line 10 def execute(environment, parameters) Helper.assert(parameters.length === 2 && Helper.is_var_address(parameters[0]) && (Helper.is_string(parameters[1]) || Helper.is_var_address(parameters[1]))) res_var = parameters[0] file_ext = Helper.resolve(environment, parameters[1]) environment.set_variable(res_var, @mime_types[file_ext]) end |
#get_identifier ⇒ Object
6 7 8 |
# File 'lib/cloudrail_si/servicecode/commands/GetMimeType.rb', line 6 def get_identifier return 'getMimeType' end |