Class: Hall::Client
Instance Method Summary collapse
-
#initialize(room_token, integration_name) ⇒ Client
constructor
A new instance of Client.
- #post_message(text) ⇒ Object
Constructor Details
#initialize(room_token, integration_name) ⇒ Client
Returns a new instance of Client.
10 11 12 13 |
# File 'lib/hall.rb', line 10 def initialize(room_token, integration_name) @room_token = room_token @integration_name = integration_name end |
Instance Method Details
#post_message(text) ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/hall.rb', line 15 def (text) body ={ "title" => @integration_name, "message" => text } = {body: body, options: { headers: { 'ContentType' => 'application/json' } } } self.class.post(room_path, ) end |