module Navy::SectionActivator::InstanceMethods

Public Instance Methods

active_sections() click to toggle source
# File lib/navy/section_activator.rb, line 36
def active_sections
  sections = []
  sections += self.class.default_active_sections || []
  sections += @active_sections || []
  sections.uniq
end
section_active?(section) click to toggle source
# File lib/navy/section_activator.rb, line 43
def section_active?(section)
  active_sections.include?(section.to_s)
end

Private Instance Methods

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