Class: Dashdate::Publisher
- Inherits:
-
Object
- Object
- Dashdate::Publisher
- Defined in:
- lib/publisher.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(notifier) ⇒ Publisher
constructor
A new instance of Publisher.
- #update(widget, values, auth) ⇒ Object
Constructor Details
#initialize(notifier) ⇒ Publisher
Returns a new instance of Publisher.
6 7 8 |
# File 'lib/publisher.rb', line 6 def initialize notifier @notifier = notifier end |
Class Method Details
Instance Method Details
#update(widget, values, auth) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/publisher.rb', line 12 def update(, values, auth) url = "http://localhost:3030/widgets/#{.to_s}" values[:auth_token] = auth result = HTTParty.post(url, :body => values.to_json) @notifier.received_http_response_code(result.code) end |