Class: TTK::Strategies::IOBased

Inherits:
Strategy show all
Includes:
Abstract
Defined in:
lib/ttk/strategies/IOBased.rb

Direct Known Subclasses

CmdBase

Instance Attribute Summary

Attributes inherited from Strategy

#status, #symtbl

Instance Method Summary collapse

Methods inherited from Strategy

#abort, #assign, #clean_instance_variables, #display_unexpected_exc, #display_unexpected_synflow_exc, #fail, #initialize_flow_factory, #pass, #raise_error, #reject, #run, #running?, #skip, #skip_if_cached, #strategy, #strategy=, #symbols=, #testify, #timeout=, #to_s, #wclass=

Constructor Details

#initialize(*a, &b) ⇒ IOBased

Constructor



18
19
20
21
22
23
# File 'lib/ttk/strategies/IOBased.rb', line 18

def initialize ( *a, &b )
	stream :input
	stream :output
  stream :error
  super
end

Instance Method Details

#stream(name) ⇒ Object



92
93
94
95
96
# File 'lib/ttk/strategies/IOBased.rb', line 92

def stream ( name )
  @streams ||= []
  @streams_name ||= []
  @streams_name << name
end

#stream_class=(aClass) ⇒ Object

Accessors



126
127
128
129
130
131
132
# File 'lib/ttk/strategies/IOBased.rb', line 126

def stream_class= ( aClass )
  if aClass.is_a? Class
    @stream_class = aClass
  else
    @stream_class = Streams.const_get(aClass)
  end
end