Class: BlogLogic::Import::WordPress::Post
- Inherits:
-
Object
- Object
- BlogLogic::Import::WordPress::Post
- Defined in:
- lib/blog_logic/import.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#date ⇒ Object
Returns the value of attribute date.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(args) ⇒ Post
constructor
A new instance of Post.
- #publication_date ⇒ Object
Constructor Details
#initialize(args) ⇒ Post
Returns a new instance of Post.
54 55 56 |
# File 'lib/blog_logic/import.rb', line 54 def initialize(args) args.each{|k,v| self.send("#{k}=",v) if self.respond_to?(k)} end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
53 54 55 |
# File 'lib/blog_logic/import.rb', line 53 def content @content end |
#date ⇒ Object
Returns the value of attribute date.
53 54 55 |
# File 'lib/blog_logic/import.rb', line 53 def date @date end |
#title ⇒ Object
Returns the value of attribute title.
53 54 55 |
# File 'lib/blog_logic/import.rb', line 53 def title @title end |
Instance Method Details
#publication_date ⇒ Object
57 58 59 |
# File 'lib/blog_logic/import.rb', line 57 def publication_date DateTime.parse(self.date) end |