Class: AdamSignals::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/adam_signals/response.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_json(json) ⇒ Object



14
15
16
# File 'lib/adam_signals/response.rb', line 14

def self.from_json(json)
  new JSON.parse(json)
end

Instance Method Details

#to_jsonObject



18
19
20
# File 'lib/adam_signals/response.rb', line 18

def to_json
  JSON.generate attributes
end

#to_sObject



22
23
24
# File 'lib/adam_signals/response.rb', line 22

def to_s
  "#<#{self.class.name} #{attributes}>"
end