Class: Amiba::Source::PageEntry
- Inherits:
-
Object
- Object
- Amiba::Source::PageEntry
- Includes:
- Amiba::Source
- Defined in:
- lib/amiba/source/entry.rb
Instance Method Summary collapse
- #filename ⇒ Object (also: #output_filename)
-
#initialize(page) ⇒ PageEntry
constructor
A new instance of PageEntry.
- #render ⇒ Object
- #save {|filename, content| ... } ⇒ Object
Methods included from Amiba::Source
Constructor Details
Instance Method Details
#filename ⇒ Object Also known as: output_filename
64 65 66 |
# File 'lib/amiba/source/entry.rb', line 64 def filename File.join("entries", name + ".#{format.to_s}") end |
#render ⇒ Object
68 69 70 |
# File 'lib/amiba/source/entry.rb', line 68 def render Amiba::Tilt.new(self).render(Amiba::Scope.new(self)) end |
#save {|filename, content| ... } ⇒ Object
58 59 60 61 62 |
# File 'lib/amiba/source/entry.rb', line 58 def save(&block) return false unless valid? yield filename, content true end |