Class: CLI::CLIO
- Inherits:
-
Object
- Object
- CLI::CLIO
- Defined in:
- lib/ttt/interfaces/cli/lib/cli/clio.rb
Instance Attribute Summary collapse
-
#instream ⇒ Object
Returns the value of attribute instream.
-
#outstream ⇒ Object
Returns the value of attribute outstream.
Instance Method Summary collapse
-
#initialize(input, output) ⇒ CLIO
constructor
A new instance of CLIO.
- #input ⇒ Object
- #output(message) ⇒ Object
Constructor Details
#initialize(input, output) ⇒ CLIO
Returns a new instance of CLIO.
4 5 6 7 |
# File 'lib/ttt/interfaces/cli/lib/cli/clio.rb', line 4 def initialize(input, output) self.outstream = output self.instream = input end |
Instance Attribute Details
#instream ⇒ Object
Returns the value of attribute instream.
3 4 5 |
# File 'lib/ttt/interfaces/cli/lib/cli/clio.rb', line 3 def instream @instream end |
#outstream ⇒ Object
Returns the value of attribute outstream.
3 4 5 |
# File 'lib/ttt/interfaces/cli/lib/cli/clio.rb', line 3 def outstream @outstream end |
Instance Method Details
#input ⇒ Object
13 14 15 |
# File 'lib/ttt/interfaces/cli/lib/cli/clio.rb', line 13 def input instream.gets end |
#output(message) ⇒ Object
9 10 11 |
# File 'lib/ttt/interfaces/cli/lib/cli/clio.rb', line 9 def output() outstream.puts end |