Class: Interview::Navigation

Inherits:
Control
  • Object
show all
Includes:
HasControls
Defined in:
lib/interview/navigation.rb

Instance Attribute Summary collapse

Attributes included from HasControls

#controls

Attributes inherited from Control

#parent

Instance Method Summary collapse

Methods included from HasControls

#add_control, #add_controls, included, #initialize, #siblings

Methods inherited from Control

#ancestors, build, definition, #find_attribute, #find_attribute!, inherited, #initialize, #set_attributes, #set_defaults

Instance Attribute Details

#action_nameObject

Returns the value of attribute action_name.



5
6
7
# File 'lib/interview/navigation.rb', line 5

def action_name
  @action_name
end

#controller_nameObject

Returns the value of attribute controller_name.



5
6
7
# File 'lib/interview/navigation.rb', line 5

def controller_name
  @controller_name
end

#current_filterObject

Returns the value of attribute current_filter.



5
6
7
# File 'lib/interview/navigation.rb', line 5

def current_filter
  @current_filter
end

#current_scopeObject

Returns the value of attribute current_scope.



5
6
7
# File 'lib/interview/navigation.rb', line 5

def current_scope
  @current_scope
end

Instance Method Details

#renderObject



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/interview/navigation.rb', line 7

def render
  auto_set_active
  
  html = Builder::XmlMarkup.new
  html.ul class: 'nav nav-pills nav-stacked' do
    @controls.each do |control|
      html << control.render
    end
  end
  return html.target!
end