class TaaS::Contract
Public Class Methods
new(hash)
click to toggle source
# File lib/helper/contract.rb, line 4 def initialize(hash) @hash = hash end
Public Instance Methods
command(params)
click to toggle source
# File lib/helper/contract.rb, line 16 def command(params) command = @hash["command"] parameter_string = ParameterFactory.generate_parameter_string(@hash["input_param_format"],params) command.scan(/<taas_params>/).empty? ? command+parameter_string : command.gsub("<taas_params>",parameter_string) end
has_property?(key)
click to toggle source
# File lib/helper/contract.rb, line 12 def has_property?(key) @hash.has_key?(key) end
value_of(key)
click to toggle source
# File lib/helper/contract.rb, line 8 def value_of(key) @hash[key] end