Class: DTK::Client::Execute::Command::APICall::Map
- Inherits:
-
Hash
- Object
- Hash
- DTK::Client::Execute::Command::APICall::Map
- Defined in:
- lib/execute/command/api_call/map.rb
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ Map
constructor
A new instance of Map.
- #translate(api_params = {}, opts = {}) ⇒ Object
Constructor Details
#initialize(hash = {}) ⇒ Map
Returns a new instance of Map.
21 22 23 24 |
# File 'lib/execute/command/api_call/map.rb', line 21 def initialize(hash={}) super() replace(hash) end |
Instance Method Details
#translate(api_params = {}, opts = {}) ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/execute/command/api_call/map.rb', line 26 def translate(api_params={},opts={}) if Rest::Post.matches?(type()) Command::RestCall::Post.new(:path => path(),:body => translate_to_rest_body(api_params,opts)) else raise "Type in following map is not defined not defined: #{self.inspect}" end end |