Class: Rrant::Output
- Inherits:
-
Object
- Object
- Rrant::Output
- Defined in:
- lib/rrant/output.rb
Overview
Public: Outputs rant hash, or serialized rant with image to the STDOUT.
rant - Hash, rant to be outputed. show_images - Boolean, when set we output attached image also.
Instance Method Summary collapse
-
#in ⇒ Object
Public: Returns rant as a hash.
-
#initialize(rant, show_images) ⇒ Output
constructor
A new instance of Output.
-
#out ⇒ Object
Public: Prints serialzied rant to the STDOUT.
Constructor Details
#initialize(rant, show_images) ⇒ Output
Returns a new instance of Output.
9 10 11 12 |
# File 'lib/rrant/output.rb', line 9 def initialize(rant, show_images) @rant = rant @show_images = show_images end |
Instance Method Details
#in ⇒ Object
Public: Returns rant as a hash.
15 16 17 |
# File 'lib/rrant/output.rb', line 15 def in @rant end |
#out ⇒ Object
Public: Prints serialzied rant to the STDOUT.
20 21 22 23 24 |
# File 'lib/rrant/output.rb', line 20 def out puts_image puts @rant['text'] puts end |