Class: Contentful::Exporter::Wordpress::PostAuthor

Inherits:
Post
  • Object
show all
Defined in:
lib/wordpress/post_author.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Post

#post_extractor, #post_id

Methods inherited from Blog

#blog_extractor, #create_directory, #link_asset, #link_entry, #output_logger, #write_json_to_file

Constructor Details

#initialize(xml, post, settings) ⇒ PostAuthor

Returns a new instance of PostAuthor.



9
10
11
12
13
# File 'lib/wordpress/post_author.rb', line 9

def initialize(xml, post, settings)
  @xml = xml
  @post = post
  @settings = settings
end

Instance Attribute Details

#postObject (readonly)

Returns the value of attribute post.



7
8
9
# File 'lib/wordpress/post_author.rb', line 7

def post
  @post
end

#settingsObject (readonly)

Returns the value of attribute settings.



7
8
9
# File 'lib/wordpress/post_author.rb', line 7

def settings
  @settings
end

#xmlObject (readonly)

Returns the value of attribute xml.



7
8
9
# File 'lib/wordpress/post_author.rb', line 7

def xml
  @xml
end

Instance Method Details

#author_extractorObject



15
16
17
18
# File 'lib/wordpress/post_author.rb', line 15

def author_extractor
  output_logger.info 'Extracting post author...'
  { id: author_id }
end