Class: CLI::CLIO

Inherits:
Object
  • Object
show all
Defined in:
lib/ttt/interfaces/cli/lib/cli/clio.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#instreamObject

Returns the value of attribute instream.



3
4
5
# File 'lib/ttt/interfaces/cli/lib/cli/clio.rb', line 3

def instream
  @instream
end

#outstreamObject

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

#inputObject



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(message)
  outstream.puts message
end