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