Module: Kin::Nav::Formatters

Defined in:
lib/kin/nav/formatters.rb

Defined Under Namespace

Classes: Basic, HasRight, Subnav

Class Method Summary collapse

Class Method Details

.HasRight(*items) ⇒ Class

Creates a HasRight subclass.

Examples:

:formatter => Kin::Nav::Formatters::HasRight(:user, :guest)

Parameters:

  • *items (Symbol)

    Symbols matching the given items which should have the custom style applied.

Returns:

  • (Class)

    A subclass of the HasRight formatter.



168
169
170
171
172
# File 'lib/kin/nav/formatters.rb', line 168

def self.HasRight(*items)
  klass = Class.new(Kin::Nav::Formatters::HasRight)
  klass.right_items = Set.new(items)
  klass
end