Sha256: 8c3a5e8ed8cc493dec1ff405945873606b9b9aa4b90aba60b280a389442f19f5

Contents?: true

Size: 604 Bytes

Versions: 9

Compression:

Stored size: 604 Bytes

Contents

class Header
  def initialize
    after_initialize!
  end

  def sign_up_path
    @sign_up_path ||= config['header']['links']['sign-up']['path']
  end

  def sign_up_text
    @sign_up_text ||= config['header']['links']['sign-up']['text']
  end

  private

  def after_initialize!
    raise 'You must provide a config/business_info.yml file in your documentation path.' unless File.exist?("#{Rails.configuration.docs_base_path}/config/business_info.yml")
  end

  def config
    @config ||= YAML.safe_load(
      File.open("#{Rails.configuration.docs_base_path}/config/business_info.yml")
    )
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
station-0.0.129 lib/nexmo_developer/app/presenters/header.rb
station-0.0.128 lib/nexmo_developer/app/presenters/header.rb
station-0.0.127 lib/nexmo_developer/app/presenters/header.rb
station-0.0.126 lib/nexmo_developer/app/presenters/header.rb
station-0.0.125 lib/nexmo_developer/app/presenters/header.rb
station-0.0.124 lib/nexmo_developer/app/presenters/header.rb
station-0.0.123 lib/nexmo_developer/app/presenters/header.rb
station-0.0.122 lib/nexmo_developer/app/presenters/header.rb
station-0.0.121 lib/nexmo_developer/app/presenters/header.rb