Class: Norikra::Listener::Stdout
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#stdout ⇒ Object
Returns the value of attribute stdout.
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argument, query_name, query_group) ⇒ Stdout
constructor
A new instance of Stdout.
- #process_sync(news, olds) ⇒ Object
Methods inherited from Base
#background, #push, #shutdown, #start, #type_convert, #update
Constructor Details
#initialize(argument, query_name, query_group) ⇒ Stdout
Returns a new instance of Stdout.
238 239 240 241 |
# File 'lib/norikra/listener.rb', line 238 def initialize(argument, query_name, query_group) super @stdout = STDOUT end |
Instance Attribute Details
#stdout ⇒ Object
Returns the value of attribute stdout.
232 233 234 |
# File 'lib/norikra/listener.rb', line 232 def stdout @stdout end |
Class Method Details
.label ⇒ Object
234 235 236 |
# File 'lib/norikra/listener.rb', line 234 def self.label "STDOUT" end |
Instance Method Details
#process_sync(news, olds) ⇒ Object
243 244 245 246 247 |
# File 'lib/norikra/listener.rb', line 243 def process_sync(news, olds) news.each do |e| @stdout.puts @query_name + "\t" + JSON.dump(e) end end |