Class: GeoConcerns::EventsGenerator::CompositeGenerator
- Inherits:
-
Object
- Object
- GeoConcerns::EventsGenerator::CompositeGenerator
- Defined in:
- app/services/geo_concerns/events_generator/composite_generator.rb
Instance Attribute Summary collapse
-
#generators ⇒ Object
readonly
Returns the value of attribute generators.
Instance Method Summary collapse
-
#initialize(*generators) ⇒ CompositeGenerator
constructor
A new instance of CompositeGenerator.
- #method_missing(m, *args) ⇒ Object
Constructor Details
#initialize(*generators) ⇒ CompositeGenerator
Returns a new instance of CompositeGenerator.
6 7 8 |
# File 'app/services/geo_concerns/events_generator/composite_generator.rb', line 6 def initialize(*generators) @generators = generators.compact end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args) ⇒ Object
10 11 12 13 14 15 |
# File 'app/services/geo_concerns/events_generator/composite_generator.rb', line 10 def method_missing(m, *args) generators.each do |generator| next unless generator.respond_to? m generator.send(m, args.first) end end |
Instance Attribute Details
#generators ⇒ Object (readonly)
Returns the value of attribute generators.
4 5 6 |
# File 'app/services/geo_concerns/events_generator/composite_generator.rb', line 4 def generators @generators end |