Sha256: 4acb48257e2c3abd43135bcaf3992beb1a24efc82f78d91232cbc15039c4cd35

Contents?: true

Size: 404 Bytes

Versions: 23

Compression:

Stored size: 404 Bytes

Contents

class TopnavItem
  attr_reader :url

  def initialize(name, url, navigation)
    @name       = name
    @url        = url
    @navigation = navigation.to_s
  end

  def title
    @title ||= I18n.t("layouts.partials.header.#{@name.downcase}")
  end

  def css_classes
    classes = ['Vlt-tabs__link']
    classes << 'Vlt-tabs__link_active' if @navigation == @name.downcase
    classes.join(' ')
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
station-0.0.120 lib/nexmo_developer/app/presenters/topnav_item.rb
station-0.0.119 lib/nexmo_developer/app/presenters/topnav_item.rb
station-0.0.118 lib/nexmo_developer/app/presenters/topnav_item.rb
station-0.0.115 lib/nexmo_developer/app/presenters/topnav_item.rb
station-0.0.114 lib/nexmo_developer/app/presenters/topnav_item.rb
station-0.0.113 lib/nexmo_developer/app/presenters/topnav_item.rb
station-0.0.112 lib/nexmo_developer/app/presenters/topnav_item.rb
station-0.0.111 lib/nexmo_developer/app/presenters/topnav_item.rb
station-0.0.110 lib/nexmo_developer/app/presenters/topnav_item.rb
station-0.0.109 lib/nexmo_developer/app/presenters/topnav_item.rb
station-0.0.108 lib/nexmo_developer/app/presenters/topnav_item.rb
station-0.0.107 lib/nexmo_developer/app/presenters/topnav_item.rb
station-0.0.106 lib/nexmo_developer/app/presenters/topnav_item.rb
station-0.0.105 lib/nexmo_developer/app/presenters/topnav_item.rb
station-0.0.104 lib/nexmo_developer/app/presenters/topnav_item.rb
station-0.0.103 lib/nexmo_developer/app/presenters/topnav_item.rb
station-0.0.102 lib/nexmo_developer/app/presenters/topnav_item.rb
station-0.0.101 lib/nexmo_developer/app/presenters/topnav_item.rb
station-0.0.100 lib/nexmo_developer/app/presenters/topnav_item.rb
station-0.0.97 lib/nexmo_developer/app/presenters/topnav_item.rb