Class: BoomNats::RouteTopic
- Inherits:
-
Object
- Object
- BoomNats::RouteTopic
- Defined in:
- lib/boom_nats/route_topic.rb
Instance Attribute Summary collapse
-
#executor ⇒ Object
readonly
Returns the value of attribute executor.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#parser ⇒ Object
readonly
Returns the value of attribute parser.
-
#queue ⇒ Object
readonly
Returns the value of attribute queue.
-
#serializer ⇒ Object
readonly
Returns the value of attribute serializer.
-
#topic ⇒ Object
readonly
Returns the value of attribute topic.
Instance Method Summary collapse
-
#initialize(application) ⇒ RouteTopic
constructor
A new instance of RouteTopic.
- #setup(topic_name, executor, serializer: nil, parser: nil, queue: nil, options: nil) ⇒ Object
Constructor Details
#initialize(application) ⇒ RouteTopic
Returns a new instance of RouteTopic.
5 6 7 |
# File 'lib/boom_nats/route_topic.rb', line 5 def initialize(application) @application = application end |
Instance Attribute Details
#executor ⇒ Object (readonly)
Returns the value of attribute executor.
3 4 5 |
# File 'lib/boom_nats/route_topic.rb', line 3 def executor @executor end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/boom_nats/route_topic.rb', line 3 def end |
#parser ⇒ Object (readonly)
Returns the value of attribute parser.
3 4 5 |
# File 'lib/boom_nats/route_topic.rb', line 3 def parser @parser end |
#queue ⇒ Object (readonly)
Returns the value of attribute queue.
3 4 5 |
# File 'lib/boom_nats/route_topic.rb', line 3 def queue @queue end |
#serializer ⇒ Object (readonly)
Returns the value of attribute serializer.
3 4 5 |
# File 'lib/boom_nats/route_topic.rb', line 3 def serializer @serializer end |
#topic ⇒ Object (readonly)
Returns the value of attribute topic.
3 4 5 |
# File 'lib/boom_nats/route_topic.rb', line 3 def topic @topic end |
Instance Method Details
#setup(topic_name, executor, serializer: nil, parser: nil, queue: nil, options: nil) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/boom_nats/route_topic.rb', line 9 def setup(topic_name, executor, serializer: nil, parser: nil, queue: nil, options: nil) @topic = topic_name @executor = executor @serializer = default_serializer(serializer) @parser = default_parser(parser) @queue = queue = (, queue) subscribe end |