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.
49 50 51 |
# File 'lib/blog_logic/import.rb', line 49 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.
48 49 50 |
# File 'lib/blog_logic/import.rb', line 48 def content @content end |
#date ⇒ Object
Returns the value of attribute date.
48 49 50 |
# File 'lib/blog_logic/import.rb', line 48 def date @date end |
#title ⇒ Object
Returns the value of attribute title.
48 49 50 |
# File 'lib/blog_logic/import.rb', line 48 def title @title end |
Instance Method Details
#publication_date ⇒ Object
52 53 54 |
# File 'lib/blog_logic/import.rb', line 52 def publication_date DateTime.parse(self.date) end |