Module: Cumuliform::Sections Private
- Included in:
- Template
- Defined in:
- lib/cumuliform/sections.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #get_section(name) ⇒ Object private
- #initialize ⇒ Object private
Instance Method Details
#get_section(name) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
21 22 23 24 |
# File 'lib/cumuliform/sections.rb', line 21 def get_section(name) raise ArgumentError, "#{name} is not a valid template section" unless SECTION_NAMES.include?(name) instance_variable_get(:"@#{name}") end |
#initialize ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
15 16 17 18 19 |
# File 'lib/cumuliform/sections.rb', line 15 def initialize SECTION_NAMES.each do |section_name| instance_variable_set(:"@#{section_name}", Section.new(section_name, imports)) end end |