Class: MerbFootnotes::Notes::FilesNote

Inherits:
AbstractNote show all
Defined in:
lib/merb_footnotes/notes/files_note.rb

Direct Known Subclasses

JavascriptsNote, StylesheetsNote

Instance Method Summary collapse

Methods inherited from AbstractNote

close!, #fieldset?, included?, #included?, #javascript, #legend, #link, #onclick, start!, #stylesheet, #title, title, #to_sym, to_sym

Constructor Details

#initialize(controller) ⇒ FilesNote

Returns a new instance of FilesNote.



6
7
8
9
# File 'lib/merb_footnotes/notes/files_note.rb', line 6

def initialize(controller)
  @files = scan_text(controller.body)
  parse_files!
end

Instance Method Details

#contentObject



15
16
17
# File 'lib/merb_footnotes/notes/files_note.rb', line 15

def content
  @files.empty? ? "" : "<ul><li>#{@files.join("</li><li>")}</li></ul>"
end

#rowObject



11
12
13
# File 'lib/merb_footnotes/notes/files_note.rb', line 11

def row
  :edit
end

#valid?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/merb_footnotes/notes/files_note.rb', line 19

def valid?
  prefix?
end