Class: Qualys::Type::Base
- Inherits:
-
Object
- Object
- Qualys::Type::Base
- Defined in:
- lib/qualys_api/base.rb
Instance Method Summary collapse
-
#initialize(hash) ⇒ Base
constructor
A new instance of Base.
- #method_missing(name, *args, &block) ⇒ Object
- #respond_to?(name, include_private = false) ⇒ Boolean
Constructor Details
#initialize(hash) ⇒ Base
Returns a new instance of Base.
73 74 75 |
# File 'lib/qualys_api/base.rb', line 73 def initialize(hash) @raw_hash = downcase_hash(hash) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
77 78 79 80 81 |
# File 'lib/qualys_api/base.rb', line 77 def method_missing(name, *args, &block) @raw_hash[name] if @raw_hash.key? name @raw_hash.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
83 84 85 86 87 |
# File 'lib/qualys_api/base.rb', line 83 def respond_to?(name, include_private = false) return true if @raw_hash.key? name @raw_hash.each { |k, _v| return true if k.to_s.to_sym == name } super end |