Class: CodecovApi::Objects::Base
- Inherits:
-
Object
- Object
- CodecovApi::Objects::Base
- Defined in:
- lib/codecov_api/objects/base.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(json) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(json) ⇒ Base
6 7 8 |
# File 'lib/codecov_api/objects/base.rb', line 6 def initialize(json) @data = JSON.parse(json.to_s) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object (private)
22 23 24 25 |
# File 'lib/codecov_api/objects/base.rb', line 22 def method_missing(method, *args, &block) super unless valid_methods.include? method root_element[method.to_s] end |