Class: Saruman::ObserverXmlConfigBuilder
- Inherits:
-
Object
- Object
- Saruman::ObserverXmlConfigBuilder
- Includes:
- XmlBuilderBase, Virtus
- Defined in:
- lib/saruman.rb
Instance Method Summary collapse
-
#initialize(observers, generator) ⇒ ObserverXmlConfigBuilder
constructor
A new instance of ObserverXmlConfigBuilder.
- #set_config_frontend_events_observers_xml ⇒ Object
Methods included from XmlBuilderBase
Constructor Details
#initialize(observers, generator) ⇒ ObserverXmlConfigBuilder
Returns a new instance of ObserverXmlConfigBuilder.
585 586 587 588 589 |
# File 'lib/saruman.rb', line 585 def initialize(observers, generator) @observers = observers @generator = generator @config_frontend_events_observers_xml = set_config_frontend_events_observers_xml end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Saruman::XmlBuilderBase
Instance Method Details
#set_config_frontend_events_observers_xml ⇒ Object
591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 |
# File 'lib/saruman.rb', line 591 def set_config_frontend_events_observers_xml xml="" observers.each do |event| xml << " <#{event}> <observers> <#{combined_namespace}_Model_Observer> <type>singleton</type> <class>#{combined_namespace}_Model_Observer</class> <method>#{event}</method> </#{combined_namespace}_Model_Observer> </observers> </#{event}> " end return xml end |