Class: Ekg::Data
- Inherits:
-
Object
- Object
- Ekg::Data
- Defined in:
- lib/ekg/data.rb
Class Method Summary collapse
Class Method Details
.receive_data ⇒ Object
14 15 16 17 |
# File 'lib/ekg/data.rb', line 14 def receive_data response = connection.get { |req| req.url("/heartbeats.json") } JSON.parse(response.body).map { |x| x[1] } end |
.send_data(data) ⇒ Object
9 10 11 12 |
# File 'lib/ekg/data.rb', line 9 def send_data(data) name = data[:name] send_the_body name, data.to_json end |