class Footer

Attributes

items[R]

Public Class Methods

navigation_category_titleize(title) click to toggle source
new(items: nil) click to toggle source
# File lib/nexmo_developer/app/presenters/footer.rb, line 4
def initialize(items: nil)
  @items = items

  after_initialize!
end

Public Instance Methods

config_exist?(path) click to toggle source
# File lib/nexmo_developer/app/presenters/footer.rb, line 76
def config_exist?(path)
  File.exist?(path)
end
open_config(config) click to toggle source
# File lib/nexmo_developer/app/presenters/footer.rb, line 72
def open_config(config)
  File.open(config)
end

Private Instance Methods

after_initialize!() click to toggle source
# File lib/nexmo_developer/app/presenters/footer.rb, line 82
def after_initialize!
  raise 'You must provide a config/business_info.yml file in your documentation path.' unless config_exist?("#{Rails.configuration.docs_base_path}/config/business_info.yml")

  @items = footer_from_config("#{Rails.configuration.docs_base_path}/config/business_info.yml")
end