Class: Wordpress::Post

Inherits:
Object
  • Object
show all
Includes:
ContentItem
Defined in:
lib/post.rb

Constant Summary collapse

ATTRIBUTE_MATCHES =
{
  :metaWeblog => {
    :postid         => :id,
    :title          => :title,
    :description    => :content,
    :mt_excerpt     => :excerpt,
    :dateCreated    => :creation_date,
    :post_state     => :struct_published
  },
  :wp => {
  }
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ContentItem

included

Instance Attribute Details

#publishedObject

Returns the value of attribute published.



18
19
20
# File 'lib/post.rb', line 18

def published
  @published
end

Instance Method Details

#struct_publishedObject



25
26
27
28
# File 'lib/post.rb', line 25

def struct_published()
  return "publish" if @published == true
  return nil
end

#struct_published=(value) ⇒ Object



20
21
22
23
# File 'lib/post.rb', line 20

def struct_published=(value)
  @published = value if [true, false].include? value
  @published = value == "publish" if value.kind_of? String
end