Class: Footnotes::Notes::AssignsNote

Inherits:
AbstractNote show all
Defined in:
lib/rails-footnotes/notes/assigns_note.rb

Instance Method Summary collapse

Methods inherited from AbstractNote

close!, #escape, #has_fieldset?, #hash_to_xml_attributes, included?, #javascript, #legend, #link, #mount_table, #mount_table_for_hash, #onclick, #prefix?, #row, start!, #stylesheet, title, #to_sym, to_sym

Constructor Details

#initialize(controller) ⇒ AssignsNote

Returns a new instance of AssignsNote.



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

def initialize(controller)
  @controller = controller
end

Instance Method Details

#contentObject



35
36
37
# File 'lib/rails-footnotes/notes/assigns_note.rb', line 35

def content
  mount_table(to_table, :summary => "Debug information for #{title}")
end

#titleObject



27
28
29
# File 'lib/rails-footnotes/notes/assigns_note.rb', line 27

def title
  "Assigns (#{assigns.size})"
end

#valid?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/rails-footnotes/notes/assigns_note.rb', line 31

def valid?
  assigns.present?
end