Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/qualys_api/base.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



107
108
109
110
111
# File 'lib/qualys_api/base.rb', line 107

def method_missing(name, *args, &block)
  self[name] if key? name
  each { |k, v| return v if k.to_s.to_sym == name }
  super.method_missing name
end

Instance Method Details

#respond_to?(name, include_private = false) ⇒ Boolean



113
114
115
116
117
# File 'lib/qualys_api/base.rb', line 113

def respond_to?(name, include_private = false)
  return true if key? name
  each { |k, _v| return true if k.to_s.to_sym == name }
  super
end