Class: BlogLogic::Import::WordPress::Post

Inherits:
Object
  • Object
show all
Defined in:
lib/blog_logic/import.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#contentObject

Returns the value of attribute content.



53
54
55
# File 'lib/blog_logic/import.rb', line 53

def content
  @content
end

#dateObject

Returns the value of attribute date.



53
54
55
# File 'lib/blog_logic/import.rb', line 53

def date
  @date
end

#titleObject

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_dateObject



57
58
59
# File 'lib/blog_logic/import.rb', line 57

def publication_date
  DateTime.parse(self.date)
end