Class: RabbitFeed::ConsoleConsumer::Formatter
- Inherits:
-
Object
- Object
- RabbitFeed::ConsoleConsumer::Formatter
- Defined in:
- lib/rabbit_feed/console_consumer.rb
Constant Summary collapse
- BORDER_WIDTH =
100
- BORDER_CHAR =
'-'.freeze
- DIVIDER_CHAR =
'*'.freeze
- NEWLINE =
"\n".freeze
Instance Attribute Summary collapse
-
#event ⇒ Object
readonly
Returns the value of attribute event.
Instance Method Summary collapse
-
#initialize(event) ⇒ Formatter
constructor
A new instance of Formatter.
- #to_s ⇒ Object
Constructor Details
#initialize(event) ⇒ Formatter
Returns a new instance of Formatter.
77 78 79 |
# File 'lib/rabbit_feed/console_consumer.rb', line 77 def initialize(event) @event = event end |
Instance Attribute Details
#event ⇒ Object (readonly)
Returns the value of attribute event.
75 76 77 |
# File 'lib/rabbit_feed/console_consumer.rb', line 75 def event @event end |
Instance Method Details
#to_s ⇒ Object
81 82 83 |
# File 'lib/rabbit_feed/console_consumer.rb', line 81 def to_s [header, , divider, payload, ].join(NEWLINE) end |