Class: Aerial::Content

Inherits:
Object show all
Defined in:
lib/aerial/content.rb

Overview

Base class for all the site’s content

Direct Known Subclasses

Article, Comment

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject (readonly)

Returns the value of attribute archive_name.



9
10
11
# File 'lib/aerial/content.rb', line 9

def archive_name
  @archive_name
end

#authorObject (readonly)

Returns the value of attribute author.



9
10
11
# File 'lib/aerial/content.rb', line 9

def author
  @author
end

#bodyObject (readonly)

Returns the value of attribute body.



9
10
11
# File 'lib/aerial/content.rb', line 9

def body
  @body
end

#file_nameObject (readonly)

Returns the value of attribute file_name.



9
10
11
# File 'lib/aerial/content.rb', line 9

def file_name
  @file_name
end

#idObject (readonly)

Returns the value of attribute id.



9
10
11
# File 'lib/aerial/content.rb', line 9

def id
  @id
end

#publish_dateObject (readonly)

Returns the value of attribute publish_date.



9
10
11
# File 'lib/aerial/content.rb', line 9

def publish_date
  @publish_date
end

#titleObject (readonly)

Returns the value of attribute title.



9
10
11
# File 'lib/aerial/content.rb', line 9

def title
  @title
end