Class: Stack::Templates::Article
- Inherits:
-
Object
- Object
- Stack::Templates::Article
- Includes:
- Parsable, Stack::Template
- Defined in:
- lib/stack/templates/article.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
Attributes included from Parsable
Attributes included from Stack::Template
#basename, #extension, #generator, #original_extension, #path, #raw
Instance Method Summary collapse
-
#initialize(*args) ⇒ Article
constructor
A new instance of Article.
- #payload ⇒ Object
- #transform(content = self.raw) ⇒ Object
- #write!(*args) ⇒ Object
Methods included from Parsable
Methods included from Stack::Template
#read, #render, #template_payload, #to_hash, #write_basename, #write_filename, #write_path
Constructor Details
#initialize(*args) ⇒ Article
Returns a new instance of Article.
9 10 11 12 13 |
# File 'lib/stack/templates/article.rb', line 9 def initialize(*args) super parse! end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
7 8 9 |
# File 'lib/stack/templates/article.rb', line 7 def content @content end |
Instance Method Details
#payload ⇒ Object
25 26 27 28 29 |
# File 'lib/stack/templates/article.rb', line 25 def payload super.merge({ :content => self.content }) end |
#transform(content = self.raw) ⇒ Object
19 20 21 22 23 |
# File 'lib/stack/templates/article.rb', line 19 def transform(content = self.raw) self.content = super self.content end |
#write!(*args) ⇒ Object
15 16 17 |
# File 'lib/stack/templates/article.rb', line 15 def write!(*args) super end |