Class: HttpObservatory::Base
- Inherits:
-
Object
- Object
- HttpObservatory::Base
- Defined in:
- lib/http_observatory/models/base.rb
Overview
Base Class for API objects
Direct Known Subclasses
GradeDistribution, HostHistory, RecentScans, Scan, ScannerStates, TestResult
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(args = {}) ⇒ Base
Returns a new instance of Base.
9 10 11 12 13 14 |
# File 'lib/http_observatory/models/base.rb', line 9 def initialize(args = {}) args.each do |name, value| attr_name = name.to_s.downcase.underscore send("#{attr_name}=", value) if respond_to?("#{attr_name}=") end end |
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors.
7 8 9 |
# File 'lib/http_observatory/models/base.rb', line 7 def errors @errors end |