Class: Xlgrep::SimpleFormatter
- Inherits:
-
Object
- Object
- Xlgrep::SimpleFormatter
- Defined in:
- lib/xlgrep/simple_formatter.rb
Instance Method Summary collapse
-
#initialize(io = nil) ⇒ SimpleFormatter
constructor
A new instance of SimpleFormatter.
- #process(obj) ⇒ Object
Constructor Details
#initialize(io = nil) ⇒ SimpleFormatter
Returns a new instance of SimpleFormatter.
5 6 7 |
# File 'lib/xlgrep/simple_formatter.rb', line 5 def initialize(io = nil) @io = io || $stdout end |
Instance Method Details
#process(obj) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/xlgrep/simple_formatter.rb', line 9 def process(obj) @io.puts "-" * 80 @io.puts "file : " << obj[:file] @io.puts "sheet : " << obj[:sheet] @io.puts "position: " << obj[:x] << obj[:y].to_s @io.puts "cell : " << obj[:data] @io.puts "msg : " << obj[:msg] end |