Class: Blogical::Content::Attachment
- Inherits:
-
Object
- Object
- Blogical::Content::Attachment
- Defined in:
- app/blogical/content.rb
Instance Attribute Summary collapse
-
#article ⇒ Object
Returns the value of attribute article.
-
#content ⇒ Object
Returns the value of attribute content.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(article, name) ⇒ Attachment
constructor
A new instance of Attachment.
Constructor Details
#initialize(article, name) ⇒ Attachment
Returns a new instance of Attachment.
129 130 131 132 |
# File 'app/blogical/content.rb', line 129 def initialize(article, name) @article, @name = article, name @content = File.join(File.(File.dirname(article.content)), name) end |
Instance Attribute Details
#article ⇒ Object
Returns the value of attribute article.
127 128 129 |
# File 'app/blogical/content.rb', line 127 def article @article end |
#content ⇒ Object
Returns the value of attribute content.
127 128 129 |
# File 'app/blogical/content.rb', line 127 def content @content end |
#name ⇒ Object
Returns the value of attribute name.
127 128 129 |
# File 'app/blogical/content.rb', line 127 def name @name end |