Class: Aerial::Content
Overview
Base class for all the site’s content
Instance Attribute Summary collapse
-
#archive_name ⇒ Object
readonly
Returns the value of attribute archive_name.
-
#author ⇒ Object
readonly
Returns the value of attribute author.
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#file_name ⇒ Object
readonly
Returns the value of attribute file_name.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#publish_date ⇒ Object
readonly
Returns the value of attribute publish_date.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(atts = {}) ⇒ Content
constructor
A new instance of Content.
Constructor Details
#initialize(atts = {}) ⇒ Content
Returns a new instance of Content.
11 12 13 |
# File 'lib/aerial/content.rb', line 11 def initialize(atts = {}) atts.each_pair { |key, value| instance_variable_set("@#{key}", value) if self.respond_to? key} end |
Instance Attribute Details
#archive_name ⇒ Object (readonly)
Returns the value of attribute archive_name.
9 10 11 |
# File 'lib/aerial/content.rb', line 9 def archive_name @archive_name end |
#author ⇒ Object (readonly)
Returns the value of attribute author.
9 10 11 |
# File 'lib/aerial/content.rb', line 9 def @author end |
#body ⇒ Object (readonly)
Returns the value of attribute body.
9 10 11 |
# File 'lib/aerial/content.rb', line 9 def body @body end |
#file_name ⇒ Object (readonly)
Returns the value of attribute file_name.
9 10 11 |
# File 'lib/aerial/content.rb', line 9 def file_name @file_name end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
9 10 11 |
# File 'lib/aerial/content.rb', line 9 def id @id end |
#publish_date ⇒ Object (readonly)
Returns the value of attribute publish_date.
9 10 11 |
# File 'lib/aerial/content.rb', line 9 def publish_date @publish_date end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
9 10 11 |
# File 'lib/aerial/content.rb', line 9 def title @title end |