Module: Footnotes::Notes::ComponentsNote

Included in:
ControllerComponentNote, ParamsComponentNote, ViewComponentNote
Defined in:
lib/rails-footnotes/notes/components_note.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



9
10
11
# File 'lib/rails-footnotes/notes/components_note.rb', line 9

def self.included(base)
  base.extend ClassMethods
end

Instance Method Details

#initialize(controller) ⇒ Object



23
24
25
26
# File 'lib/rails-footnotes/notes/components_note.rb', line 23

def initialize(controller)
  super
  @controller = controller
end

#legendObject



32
33
34
# File 'lib/rails-footnotes/notes/components_note.rb', line 32

def legend
  "#{super} for #{row}"
end

#rowObject



28
29
30
# File 'lib/rails-footnotes/notes/components_note.rb', line 28

def row
  "#{@controller.controller_name.camelize}##{@controller.action_name.camelize} Component"
end