Class: Dilbert::Console
- Inherits:
-
Object
- Object
- Dilbert::Console
- Defined in:
- lib/dilbert.rb
Instance Method Summary collapse
-
#initialize(printer, dilbert_service) ⇒ Console
constructor
A new instance of Console.
- #run(*args) ⇒ Object
Constructor Details
#initialize(printer, dilbert_service) ⇒ Console
Returns a new instance of Console.
8 9 10 11 |
# File 'lib/dilbert.rb', line 8 def initialize(printer, dilbert_service) @printer = printer @dilbert_service = dilbert_service end |
Instance Method Details
#run(*args) ⇒ Object
13 14 15 |
# File 'lib/dilbert.rb', line 13 def run(*args) @printer.puts @dilbert_service.fetch_latest end |