Class: Sensi::PollResponse
- Inherits:
-
HashToObject
- Object
- HashToObject
- Sensi::PollResponse
- Defined in:
- lib/sensi/poll_response.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#json ⇒ Object
readonly
Returns the value of attribute json.
Instance Method Summary collapse
- #groups_token ⇒ Object
-
#initialize(json) ⇒ PollResponse
constructor
A new instance of PollResponse.
- #message_id ⇒ Object
- #timed_out? ⇒ Boolean
Methods inherited from HashToObject
#add, #add_var, #contains_hash, #convert, #from_json!, #to_json
Constructor Details
#initialize(json) ⇒ PollResponse
Returns a new instance of PollResponse.
10 11 12 13 14 15 16 |
# File 'lib/sensi/poll_response.rb', line 10 def initialize(json) @json = json convert(json) @code = 200 rescue @code = 500 end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
8 9 10 |
# File 'lib/sensi/poll_response.rb', line 8 def code @code end |
#json ⇒ Object (readonly)
Returns the value of attribute json.
8 9 10 |
# File 'lib/sensi/poll_response.rb', line 8 def json @json end |
Instance Method Details
#groups_token ⇒ Object
22 23 24 25 26 |
# File 'lib/sensi/poll_response.rb', line 22 def groups_token self.g rescue nil end |
#message_id ⇒ Object
18 19 20 |
# File 'lib/sensi/poll_response.rb', line 18 def self.c end |
#timed_out? ⇒ Boolean
28 29 30 |
# File 'lib/sensi/poll_response.rb', line 28 def timed_out? respond_to?(:t) end |