Class: Navigatrix::ItemCollection

Inherits:
Struct
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/navigatrix/item_collection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configurationObject

Returns the value of attribute configuration

Returns:

  • (Object)

    the current value of configuration



2
3
4
# File 'lib/navigatrix/item_collection.rb', line 2

def configuration
  @configuration
end

#contextObject

Returns the value of attribute context

Returns:

  • (Object)

    the current value of context



2
3
4
# File 'lib/navigatrix/item_collection.rb', line 2

def context
  @context
end

Instance Method Details

#itemsObject



6
7
8
# File 'lib/navigatrix/item_collection.rb', line 6

def items
  configuration.map { |name, config| Item.new(name, config, context) }
end