class GoodData::LCM2::SmartHash
Public Instance Methods
[](variable)
click to toggle source
# File lib/gooddata/lcm/lcm2.rb, line 36 def [](variable) data(variable) end
check_specification(variable)
click to toggle source
# File lib/gooddata/lcm/lcm2.rb, line 48 def check_specification(variable) if @specification && !@specification[variable.to_sym] && !@specification[variable.to_s] \ && !@specification[variable.to_s.downcase.to_sym] && !@specification[variable.to_s.downcase] fail "Param #{variable} is not defined in the specification" end end
clear_filters()
click to toggle source
# File lib/gooddata/lcm/lcm2.rb, line 40 def clear_filters @specification = nil end
data(variable)
click to toggle source
# File lib/gooddata/lcm/lcm2.rb, line 55 def data(variable) check_specification(variable) fetch(keys.find { |k| k.to_s.downcase.to_sym == variable.to_s.downcase.to_sym }, nil) end
key?(key)
click to toggle source
Calls superclass method
# File lib/gooddata/lcm/lcm2.rb, line 60 def key?(key) return true if super keys.each do |k| return true if k.to_s.downcase.to_sym == key.to_s.downcase.to_sym end false end
method_missing(name, *_args)
click to toggle source
# File lib/gooddata/lcm/lcm2.rb, line 32 def method_missing(name, *_args) data(name) end
respond_to_missing?(name, *_args)
click to toggle source
# File lib/gooddata/lcm/lcm2.rb, line 70 def respond_to_missing?(name, *_args) key = name.to_s.downcase.to_sym key?(key) end
setup_filters(filter)
click to toggle source
# File lib/gooddata/lcm/lcm2.rb, line 44 def setup_filters(filter) @specification = filter.to_hash end