Class: Speck::Battery
- Inherits:
-
Object
- Object
- Speck::Battery
- Defined in:
- lib/speck/battery.rb
Overview
A ‘Battery` of `Speck`s is a set of specks which should be executed together, and which interdepend upon other `Speck`s in the battery. `Batteries` are recursive structures; that is, a `Battery` may have sub– `Batteries` for relevant objects.
Instance Attribute Summary collapse
-
#specks ⇒ Object
readonly
Returns the value of attribute specks.
-
#targets ⇒ Object
readonly
Returns the value of attribute targets.
Instance Method Summary collapse
- #<<(speck) ⇒ Object
- #[](object) ⇒ Object
-
#initialize ⇒ Battery
constructor
A new instance of Battery.
Constructor Details
#initialize ⇒ Battery
Returns a new instance of Battery.
12 13 14 15 |
# File 'lib/speck/battery.rb', line 12 def initialize @specks = Array.new @targets = Hash.new end |
Instance Attribute Details
#specks ⇒ Object (readonly)
Returns the value of attribute specks.
9 10 11 |
# File 'lib/speck/battery.rb', line 9 def specks @specks end |
#targets ⇒ Object (readonly)
Returns the value of attribute targets.
10 11 12 |
# File 'lib/speck/battery.rb', line 10 def targets @targets end |