Class: Arclight::Routes::Hierarchy

Inherits:
Object
  • Object
show all
Defined in:
lib/arclight/routes/hierarchy.rb

Overview

Inject a hierarchy route for displaying the components in the collection context

Instance Method Summary collapse

Constructor Details

#initialize(defaults = {}) ⇒ Hierarchy

Returns a new instance of Hierarchy.



8
9
10
# File 'lib/arclight/routes/hierarchy.rb', line 8

def initialize(defaults = {})
  @defaults = defaults
end

Instance Method Details

#call(mapper, _options = {}) ⇒ Object



12
13
14
15
16
# File 'lib/arclight/routes/hierarchy.rb', line 12

def call(mapper, _options = {})
  mapper.member do
    mapper.get 'hierarchy'
  end
end