module Navy::SectionActivator::ClassMethods

Public Instance Methods

default_active_sections() click to toggle source
# File lib/navy/section_activator.rb, line 15
def default_active_sections
  @default_active_sections_with_ancestors ||= begin
    sections = @default_active_sections || []
    if superclass.respond_to?(:default_active_sections)
      sections += superclass.default_active_sections
    end
    sections
  end
end

Private Instance Methods

in_sections(*sections) click to toggle source
# File lib/navy/section_activator.rb, line 27
def in_sections(*sections)
  @default_active_sections ||= []
  @default_active_sections += sections.collect(&:to_s)
end