Class: Krakow::Command::Sub

Inherits:
Krakow::Command show all
Defined in:
lib/krakow/command/sub.rb

Overview

Subscribe to topic/channel

Instance Attribute Summary (collapse)

Attributes (collapse)

Class Method Summary (collapse)

Instance Method Summary (collapse)

Instance Attribute Details

- (Krakow::FrameType) response Originally defined in class Krakow::Command

Returns response to command

Returns:

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

Returns:

  • (String)

    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

Returns:

  • (TrueClass, FalseClass)

    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

Returns:

  • (String)

    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

Returns:

  • (TrueClass, FalseClass)

    truthiness of the topic_name attribute



15
# File 'lib/krakow/command/sub.rb', line 15

attribute :topic_name, String, :required => true