Class: PagerDuty::Response
- Inherits:
-
Common::Base
- Object
- Common::Base
- PagerDuty::Response
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/pagerduty/response.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Common::Base
Instance Method Summary collapse
- #cache? ⇒ Boolean
-
#initialize(status, attributes = nil) ⇒ Response
constructor
A new instance of Response.
- #ok? ⇒ Boolean
Methods inherited from Common::Base
#changed, #changed?, #changes, default_sort, filterable_attributes, max_per_page, per_page, sortable_attributes
Constructor Details
#initialize(status, attributes = nil) ⇒ Response
Returns a new instance of Response.
11 12 13 14 |
# File 'lib/pagerduty/response.rb', line 11 def initialize(status, attributes = nil) super(attributes) if attributes self.status = status end |
Instance Method Details
#cache? ⇒ Boolean
20 21 22 |
# File 'lib/pagerduty/response.rb', line 20 def cache? ok? end |
#ok? ⇒ Boolean
16 17 18 |
# File 'lib/pagerduty/response.rb', line 16 def ok? status == 200 end |