Class: Krakow::Command::Sub
- Inherits:
-
Krakow::Command
- Object
- Krakow::Command
- Krakow::Command::Sub
- Defined in:
- lib/krakow/command/sub.rb
Overview
Subscribe to topic/channel
Instance Attribute Summary (collapse)
-
- (Krakow::FrameType) response
inherited
from Krakow::Command
Response to command.
Attributes (collapse)
-
- (String) channel_name
The channel_name attribute.
-
- (TrueClass, FalseClass) channel_name?
Truthiness of the channel_name attribute.
-
- (String) topic_name
The topic_name attribute.
-
- (TrueClass, FalseClass) topic_name?
Truthiness of the topic_name attribute.
Class Method Summary (collapse)
Instance Method Summary (collapse)
Instance Attribute Details
- (Krakow::FrameType) response Originally defined in class Krakow::Command
Returns response to command
Class Method Details
+ (Object) error
29 30 31 |
# File 'lib/krakow/command/sub.rb', line 29 def error %w(E_INVALID E_BAD_TOPIC E_BAD_CHANNEL) end |
+ (Object) ok
25 26 27 |
# File 'lib/krakow/command/sub.rb', line 25 def ok %w(OK) end |
Instance Method Details
- (String) channel_name
Returns the channel_name attribute
16 |
# File 'lib/krakow/command/sub.rb', line 16 attribute :channel_name, String, :required => true |
- (TrueClass, FalseClass) channel_name?
Returns truthiness of the channel_name attribute
16 |
# File 'lib/krakow/command/sub.rb', line 16 attribute :channel_name, String, :required => true |
- (Object) to_line
20 21 22 |
# File 'lib/krakow/command/sub.rb', line 20 def to_line "#{name} #{topic_name} #{channel_name}\n" end |
- (String) topic_name
Returns the topic_name attribute
15 |
# File 'lib/krakow/command/sub.rb', line 15 attribute :topic_name, String, :required => true |
- (TrueClass, FalseClass) topic_name?
Returns truthiness of the topic_name attribute
15 |
# File 'lib/krakow/command/sub.rb', line 15 attribute :topic_name, String, :required => true |