Module: DynamicFooter::FooterInfo

Defined in:
lib/dynamic_footer/footer_info.rb

Class Method Summary collapse

Class Method Details



13
14
15
16
17
18
19
# File 'lib/dynamic_footer/footer_info.rb', line 13

def self.format_footer(footer_statement = {})
  "#{footer_statement[:copyright]}
  #{footer_statement[:year]}
  #{footer_statement[:name]}
  #{footer_statement[:separator]}
  #{footer_statement[:rights]}"
end

.info(footer_element = {}) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/dynamic_footer/footer_info.rb', line 3

def self.info(footer_element = {})
  {
    copyright: footer_element[:copyright] || '©',
    year: Time.now.year,
    name: footer_element[:name] || Rails.application.class.module_parent_name,
    separator: footer_element[:separator] || ' - ',
    rights: footer_element[:rights] || 'All Rights Reserved'
  }
end