Class: Saruman::ControllerXmlConfigBuilder

Inherits:
Object
  • Object
show all
Includes:
XmlBuilderBase, Virtus
Defined in:
lib/saruman.rb

Instance Method Summary collapse

Methods included from XmlBuilderBase

#method_missing

Constructor Details

#initialize(controllers, generator) ⇒ ControllerXmlConfigBuilder

Returns a new instance of ControllerXmlConfigBuilder.



619
620
621
622
623
624
625
# File 'lib/saruman.rb', line 619

def initialize(controllers, generator)
  @controllers = controllers
  @generator = generator
  @config_frontend_routers_name_xml = set_config_frontend_routers_name_xml
  @config_frontend_layout_xml = set_config_frontend_layout_xml
  @config_global_blocks_xml = set_config_global_blocks_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_layout_xmlObject



640
641
642
643
644
645
646
647
648
649
650
651
# File 'lib/saruman.rb', line 640

def set_config_frontend_layout_xml
  xml="
  <layout>
    <updates>
      <#{name_lower}>
        <file>#{name_lower}.xml</file>
      </#{name_lower}>
    </updates>
  </layout>
"
  return xml
end

#set_config_frontend_routers_name_xmlObject



627
628
629
630
631
632
633
634
635
636
637
638
# File 'lib/saruman.rb', line 627

def set_config_frontend_routers_name_xml
  xml="
  <#{name_lower}>
    <use>standard</use>
    <args>
      <module>#{combined_namespace}</module>
      <frontName>#{controller_front_name}</frontName>
    </args>  
  </#{name_lower}>
"
  return xml
end

#set_config_global_blocks_xmlObject



653
654
655
656
657
658
659
660
661
662
# File 'lib/saruman.rb', line 653

def set_config_global_blocks_xml
  xml="
  <blocks>
      <#{name_lower}>
        <class>#{block_klass_name}</class>
      </#{name_lower}>
  </blocks>
"
  return xml
end