Class: ActionConductor::Collection
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- ActionConductor::Collection
- Defined in:
- lib/action_conductor/collection.rb
Instance Attribute Summary collapse
-
#conductors ⇒ Object
readonly
Returns the value of attribute conductors.
Instance Method Summary collapse
-
#initialize(conductors = Array.new) ⇒ Collection
constructor
A new instance of Collection.
- #with_handle(handle) ⇒ Object
Constructor Details
#initialize(conductors = Array.new) ⇒ Collection
Returns a new instance of Collection.
8 9 10 11 |
# File 'lib/action_conductor/collection.rb', line 8 def initialize(conductors = Array.new) @conductors = conductors super(@conductors) end |
Instance Attribute Details
#conductors ⇒ Object (readonly)
Returns the value of attribute conductors.
6 7 8 |
# File 'lib/action_conductor/collection.rb', line 6 def conductors @conductors end |
Instance Method Details
#with_handle(handle) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/action_conductor/collection.rb', line 13 def with_handle(handle) conductors = selected_conductors_by_handle(handle) if conductors.empty? raise "No conductors with the handle: #{handle}" else conductors end end |