class DTK::Client::Execute::Command::APICall::Equal::OrDefault
Public Class Methods
new(default_value)
click to toggle source
# File lib/execute/command/api_call/translation_term.rb, line 94 def initialize(default_value) @default_value = default_value end
Public Instance Methods
translate(key,api_params,opts={})
click to toggle source
# File lib/execute/command/api_call/translation_term.rb, line 97 def translate(key,api_params,opts={}) has_key?(api_params,key) ? index(api_params,key) : @default_value end