Class: WikiOnThisDay::Printer
- Inherits:
-
Object
- Object
- WikiOnThisDay::Printer
- Defined in:
- lib/wiki_on_this_day/printer.rb
Instance Attribute Summary collapse
-
#snippet ⇒ Object
readonly
Returns the value of attribute snippet.
Instance Method Summary collapse
-
#initialize(snippet) ⇒ Printer
constructor
A new instance of Printer.
- #print ⇒ Object
Constructor Details
#initialize(snippet) ⇒ Printer
Returns a new instance of Printer.
5 6 7 |
# File 'lib/wiki_on_this_day/printer.rb', line 5 def initialize(snippet) @snippet = snippet end |
Instance Attribute Details
#snippet ⇒ Object (readonly)
Returns the value of attribute snippet.
3 4 5 |
# File 'lib/wiki_on_this_day/printer.rb', line 3 def snippet @snippet end |
Instance Method Details
#print ⇒ Object
9 10 11 12 |
# File 'lib/wiki_on_this_day/printer.rb', line 9 def print puts snippet.year puts snippet.text end |