Class: Straightedge::Engine
- Inherits:
-
Object
- Object
- Straightedge::Engine
- Defined in:
- lib/straightedge/motor/engine.rb
Instance Attribute Summary collapse
-
#adapter ⇒ Object
readonly
Returns the value of attribute adapter.
-
#agent ⇒ Object
readonly
Returns the value of attribute agent.
-
#surface ⇒ Object
readonly
Returns the value of attribute surface.
Instance Method Summary collapse
- #boot ⇒ Object
-
#initialize(surface_geometry = Straightedge.config.geometry) ⇒ Engine
constructor
A new instance of Engine.
Constructor Details
#initialize(surface_geometry = Straightedge.config.geometry) ⇒ Engine
Returns a new instance of Engine.
4 5 6 7 8 |
# File 'lib/straightedge/motor/engine.rb', line 4 def initialize(surface_geometry=Straightedge.config.geometry) @agent = Straightedge.new_agent @surface = Straightedge.new_surface(surface_geometry) @adapter = Straightedge.new_adapter(agent: @agent, plane: @surface) end |
Instance Attribute Details
#adapter ⇒ Object (readonly)
Returns the value of attribute adapter.
3 4 5 |
# File 'lib/straightedge/motor/engine.rb', line 3 def adapter @adapter end |
#agent ⇒ Object (readonly)
Returns the value of attribute agent.
3 4 5 |
# File 'lib/straightedge/motor/engine.rb', line 3 def agent @agent end |
#surface ⇒ Object (readonly)
Returns the value of attribute surface.
3 4 5 |
# File 'lib/straightedge/motor/engine.rb', line 3 def surface @surface end |
Instance Method Details
#boot ⇒ Object
10 11 12 |
# File 'lib/straightedge/motor/engine.rb', line 10 def boot @adapter.kickstart end |