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.



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

#contentObject

Returns the value of attribute content.



48
49
50
# File 'lib/blog_logic/import.rb', line 48

def content
  @content
end

#dateObject

Returns the value of attribute date.



48
49
50
# File 'lib/blog_logic/import.rb', line 48

def date
  @date
end

#titleObject

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_dateObject



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

def publication_date
  DateTime.parse(self.date)
end