Class: Urbit::SubscribeMessage
- Defined in:
- lib/urbit/subscribe_message.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Attributes inherited from Message
#app, #channel, #contents, #id, #mark
Instance Method Summary collapse
- #action ⇒ Object
-
#initialize(channel:, app:, path:) ⇒ SubscribeMessage
constructor
A new instance of SubscribeMessage.
- #to_h ⇒ Object
Methods inherited from Message
#channel_url, #request_body, #ship, #to_a, #to_s, #transmit
Constructor Details
#initialize(channel:, app:, path:) ⇒ SubscribeMessage
Returns a new instance of SubscribeMessage.
5 6 7 8 |
# File 'lib/urbit/subscribe_message.rb', line 5 def initialize(channel:, app:, path:) super(channel: channel, app: app) @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
3 4 5 |
# File 'lib/urbit/subscribe_message.rb', line 3 def path @path end |
Instance Method Details
#action ⇒ Object
10 11 12 |
# File 'lib/urbit/subscribe_message.rb', line 10 def action "subscribe" end |
#to_h ⇒ Object
14 15 16 |
# File 'lib/urbit/subscribe_message.rb', line 14 def to_h {action: self.action, app: self.app, id: self.id, path: self.path, ship: self.ship.untilded_name} end |