Class: Scale::Callbacks::Base
- Inherits:
-
Object
- Object
- Scale::Callbacks::Base
- Defined in:
- lib/scale/callbacks/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#json ⇒ Object
readonly
Returns the value of attribute json.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ Base
constructor
A new instance of Base.
- #status_code ⇒ Object
Constructor Details
Instance Attribute Details
#json ⇒ Object (readonly)
Returns the value of attribute json.
4 5 6 |
# File 'lib/scale/callbacks/base.rb', line 4 def json @json end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
4 5 6 |
# File 'lib/scale/callbacks/base.rb', line 4 def response @response end |
Class Method Details
.match?(method) ⇒ Boolean
20 21 22 |
# File 'lib/scale/callbacks/base.rb', line 20 def self.match?(method) shortcut.to_s == method.to_s end |
.shortcut ⇒ Object
16 17 18 |
# File 'lib/scale/callbacks/base.rb', line 16 def self.shortcut raise NotImplementedError end |
Instance Method Details
#status_code ⇒ Object
11 12 13 |
# File 'lib/scale/callbacks/base.rb', line 11 def status_code response[:status_code] end |