Class: Vident::StimulusOutletCollection
- Inherits:
-
StimulusCollectionBase
- Object
- StimulusCollectionBase
- Vident::StimulusOutletCollection
- Defined in:
- lib/vident/stimulus_outlet_collection.rb
Instance Method Summary collapse
Methods inherited from StimulusCollectionBase
#<<, #any?, #empty?, #initialize, #merge, merge, #to_a, #to_hash
Constructor Details
This class inherits a constructor from Vident::StimulusCollectionBase
Instance Method Details
#to_h ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/vident/stimulus_outlet_collection.rb', line 5 def to_h return {} if items.empty? merged = {} items.each do |outlet| merged.merge!(outlet.to_h) end merged end |