Module: Dramaturg::Command::AsCollection
- Includes:
- Enumerable
- Included in:
- Dramaturg::Command
- Defined in:
- lib/dramaturg/command/as_collection.rb
Instance Method Summary collapse
Instance Method Details
#<<(v) ⇒ Object
23 24 25 |
# File 'lib/dramaturg/command/as_collection.rb', line 23 def <<(v) @values << v end |
#[](i) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/dramaturg/command/as_collection.rb', line 10 def [](i) run unless ran? if self.respond_to? i self.send i else @outputs[i].for_prompt end end |
#[]=(i, v) ⇒ Object
19 20 21 |
# File 'lib/dramaturg/command/as_collection.rb', line 19 def []=(i,v) @outputs[i] = v end |
#each(&b) ⇒ Object
6 7 8 |
# File 'lib/dramaturg/command/as_collection.rb', line 6 def each &b @values.each &b end |
#output ⇒ Object
27 28 29 |
# File 'lib/dramaturg/command/as_collection.rb', line 27 def output @outputs[:output] end |