Class: Pione::Agent::InputGeneratorMethod

Inherits:
Object
  • Object
show all
Defined in:
lib/pione/agent/input-generator.rb

Overview

InputGeneratorMethod is an interface class for generator methods.

Direct Known Subclasses

DirInputGeneratorMethod

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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_locationObject (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

#streamObject (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

#generateObject

Generate an input tuple.

Raises:

  • (NotImplementedError)


129
130
131
# File 'lib/pione/agent/input-generator.rb', line 129

def generate
  raise NotImplementedError
end

#initObject

Initialize the generator method.

Raises:

  • (NotImplementedError)


124
125
126
# File 'lib/pione/agent/input-generator.rb', line 124

def init
  raise NotImplementedError
end

#nowObject

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