Class: Spinoza::Model
- Inherits:
-
Object
- Object
- Spinoza::Model
- Defined in:
- lib/spinoza/system/model.rb
Overview
Base class for all model classes that know about the passage of time.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#timeline ⇒ Object
readonly
Returns the value of attribute timeline.
Instance Method Summary collapse
-
#initialize(timeline: nil) ⇒ Model
constructor
A new instance of Model.
- #time_now ⇒ Object
Constructor Details
#initialize(timeline: nil) ⇒ Model
Returns a new instance of Model.
7 8 9 |
# File 'lib/spinoza/system/model.rb', line 7 def initialize timeline: nil @timeline = timeline end |
Instance Attribute Details
#timeline ⇒ Object (readonly)
Returns the value of attribute timeline.
5 6 7 |
# File 'lib/spinoza/system/model.rb', line 5 def timeline @timeline end |
Instance Method Details
#time_now ⇒ Object
11 12 13 |
# File 'lib/spinoza/system/model.rb', line 11 def time_now timeline.now end |