Sha256: 726938b145e9ab081bbc30bd992068e892269eb89b39bbe5efc6250d08c6e85f

Contents?: true

Size: 790 Bytes

Versions: 62

Compression:

Stored size: 790 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

  def sign_in_path
    @sign_in_path ||= config['header']['links']['sign-in']['path']
  end

  def sign_in_text
    @sign_in_text ||= config['header']['links']['sign-in']['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

62 entries across 62 versions & 1 rubygems

Version Path
station-0.5.16 lib/nexmo_developer/app/presenters/header.rb
station-0.5.15 lib/nexmo_developer/app/presenters/header.rb
station-0.5.14 lib/nexmo_developer/app/presenters/header.rb
station-0.5.13 lib/nexmo_developer/app/presenters/header.rb
station-0.5.12 lib/nexmo_developer/app/presenters/header.rb
station-0.5.11 lib/nexmo_developer/app/presenters/header.rb
station-0.5.10 lib/nexmo_developer/app/presenters/header.rb
station-0.5.9 lib/nexmo_developer/app/presenters/header.rb
station-0.5.8 lib/nexmo_developer/app/presenters/header.rb
station-0.5.7 lib/nexmo_developer/app/presenters/header.rb
station-0.5.6 lib/nexmo_developer/app/presenters/header.rb
station-0.5.5 lib/nexmo_developer/app/presenters/header.rb
station-0.5.4 lib/nexmo_developer/app/presenters/header.rb
station-0.5.3 lib/nexmo_developer/app/presenters/header.rb
station-0.5.2 lib/nexmo_developer/app/presenters/header.rb
station-0.5.1 lib/nexmo_developer/app/presenters/header.rb
station-0.5.0 lib/nexmo_developer/app/presenters/header.rb
station-0.4.9 lib/nexmo_developer/app/presenters/header.rb
station-0.4.8 lib/nexmo_developer/app/presenters/header.rb
station-0.4.7 lib/nexmo_developer/app/presenters/header.rb