Class: Blogical::Content::Article
- Inherits:
-
Object
- Object
- Blogical::Content::Article
- Defined in:
- app/blogical/content.rb
Instance Attribute Summary collapse
-
#attachments(*attachments) ⇒ Object
Returns the value of attribute attachments.
-
#content ⇒ Object
Returns the value of attribute content.
-
#permalink(link = nil) ⇒ Object
Returns the value of attribute permalink.
-
#posted(date = nil) ⇒ Object
Returns the value of attribute posted.
-
#tags(*tags) ⇒ Object
Returns the value of attribute tags.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
- #article(title, &block) ⇒ Object
- #email ⇒ Object
-
#initialize(meta) ⇒ Article
constructor
A new instance of Article.
-
#nickname ⇒ Object
REVISIT: most recent content file git commit author.
- #url ⇒ Object
Constructor Details
#initialize(meta) ⇒ Article
Returns a new instance of Article.
78 79 80 81 |
# File 'app/blogical/content.rb', line 78 def initialize() @path, @content = , File.join(File.(File.dirname()), 'content.markdown') instance_eval File.read() end |
Instance Attribute Details
#attachments(*attachments) ⇒ Object
Returns the value of attribute attachments.
76 77 78 |
# File 'app/blogical/content.rb', line 76 def @attachments end |
#content ⇒ Object
Returns the value of attribute content.
76 77 78 |
# File 'app/blogical/content.rb', line 76 def content @content end |
#permalink(link = nil) ⇒ Object
Returns the value of attribute permalink.
76 77 78 |
# File 'app/blogical/content.rb', line 76 def permalink @permalink end |
#posted(date = nil) ⇒ Object
Returns the value of attribute posted.
76 77 78 |
# File 'app/blogical/content.rb', line 76 def posted @posted end |
#tags(*tags) ⇒ Object
Returns the value of attribute tags.
76 77 78 |
# File 'app/blogical/content.rb', line 76 def @tags end |
#title ⇒ Object
Returns the value of attribute title.
76 77 78 |
# File 'app/blogical/content.rb', line 76 def title @title end |
Instance Method Details
#article(title, &block) ⇒ Object
83 84 85 86 |
# File 'app/blogical/content.rb', line 83 def article(title, &block) @title = title instance_eval &block end |
#email ⇒ Object
106 107 108 |
# File 'app/blogical/content.rb', line 106 def email Blogical::Application.email end |
#nickname ⇒ Object
REVISIT: most recent content file git commit author
102 103 104 |
# File 'app/blogical/content.rb', line 102 def nickname Blogical::Application.nickname end |
#url ⇒ Object
110 111 112 |
# File 'app/blogical/content.rb', line 110 def url "/blog/#{@posted}/#{@permalink}" end |