Class: Blogical::Content::Attachment

Inherits:
Object
  • Object
show all
Defined in:
app/blogical/content.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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.expand_path(File.dirname(article.content)), name)
end

Instance Attribute Details

#articleObject

Returns the value of attribute article.



127
128
129
# File 'app/blogical/content.rb', line 127

def article
  @article
end

#contentObject

Returns the value of attribute content.



127
128
129
# File 'app/blogical/content.rb', line 127

def content
  @content
end

#nameObject

Returns the value of attribute name.



127
128
129
# File 'app/blogical/content.rb', line 127

def name
  @name
end