Class: Pione::Agent::InputGeneratorMethod
- Inherits:
-
Object
- Object
- Pione::Agent::InputGeneratorMethod
- Defined in:
- lib/pione/agent/input-generator.rb
Overview
InputGeneratorMethod is an interface class for generator methods.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#input_location ⇒ Object
readonly
Returns the value of attribute input_location.
-
#stream ⇒ Object
(also: #stream?)
readonly
Returns the value of attribute stream.
Class Method Summary collapse
Instance Method Summary collapse
-
#generate ⇒ Object
Generate an input tuple.
-
#init ⇒ Object
Initialize the generator method.
-
#initialize(space, input_location, stream) ⇒ InputGeneratorMethod
constructor
A new instance of InputGeneratorMethod.
-
#now ⇒ Object
Return current time.
Constructor Details
#initialize(space, input_location, stream) ⇒ InputGeneratorMethod
Returns a new instance of InputGeneratorMethod.
112 113 114 115 116 |
# File 'lib/pione/agent/input-generator.rb', line 112 def initialize(space, input_location, stream) @__space__ = space @input_location = input_location @stream = stream end |
Instance Attribute Details
#input_location ⇒ Object (readonly)
Returns the value of attribute input_location.
108 109 110 |
# File 'lib/pione/agent/input-generator.rb', line 108 def input_location @input_location end |
#stream ⇒ Object (readonly) Also known as: stream?
Returns the value of attribute stream.
109 110 111 |
# File 'lib/pione/agent/input-generator.rb', line 109 def stream @stream end |
Class Method Details
.method_name(name) ⇒ Object
104 105 106 |
# File 'lib/pione/agent/input-generator.rb', line 104 def self.method_name(name) InputGenerator.generator_method[name] = self end |
Instance Method Details
#generate ⇒ Object
Generate an input tuple.
129 130 131 |
# File 'lib/pione/agent/input-generator.rb', line 129 def generate raise NotImplementedError end |
#init ⇒ Object
Initialize the generator method.
124 125 126 |
# File 'lib/pione/agent/input-generator.rb', line 124 def init raise NotImplementedError end |
#now ⇒ Object
Return current time. The time is based on tuple space.
119 120 121 |
# File 'lib/pione/agent/input-generator.rb', line 119 def now @__space__.now end |