Class: DiandianOAuth::ResponseMeta
- Inherits:
-
Object
- Object
- DiandianOAuth::ResponseMeta
- Defined in:
- lib/diandian_oauth/models/response_meta.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
Returns the value of attribute message.
-
#status ⇒ Object
Returns the value of attribute status.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message.
3 4 5 |
# File 'lib/diandian_oauth/models/response_meta.rb', line 3 def @message end |
#status ⇒ Object
Returns the value of attribute status.
3 4 5 |
# File 'lib/diandian_oauth/models/response_meta.rb', line 3 def status @status end |
Class Method Details
.from_response(response_json) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/diandian_oauth/models/response_meta.rb', line 4 def self.from_response response_json = response_json['meta'] = ResponseMeta.new .status = ['status'] . = ['msg'] end |
Instance Method Details
#success? ⇒ Boolean
12 13 14 |
# File 'lib/diandian_oauth/models/response_meta.rb', line 12 def success? self.validate end |
#validate ⇒ Object
16 17 18 |
# File 'lib/diandian_oauth/models/response_meta.rb', line 16 def validate self.status == 200 end |