Parent

Class Index [+]

Quicksearch

PagePost

Public Instance Methods

content() click to toggle source

Grab the content of the selected page/post

    # File lib/wpb/pagepost.rb, line 31
31:         def content
32:                 post_content
33:         end
content=(new_content) click to toggle source

Set the content of the selected page/post

    # File lib/wpb/pagepost.rb, line 38
38:         def content= new_content
39:                 self.post_content = new_content
40:         end
title() click to toggle source

Grab the title of the selected page/post

    # File lib/wpb/pagepost.rb, line 17
17:         def title
18:                 post_title
19:         end
title=(new_title) click to toggle source

Set the title of the selected page/post

    # File lib/wpb/pagepost.rb, line 24
24:         def title= new_title
25:                 self.post_title = new_title
26:         end

Private Instance Methods

set_default_values() click to toggle source
    # File lib/wpb/pagepost.rb, line 43
43:         def set_default_values
44:                 t = Time.now
45:                 self.post_date = t
46:                 self.post_date_gmt = t.gmtime
47:                 
48:                 # Ready for when Site model is added
49:                 # site_url = Site.find_by_option_name "siteurl"
50:                 # type = 'p'
51:                 # if self.type == "Page"
52:                 #     type << 'age_id'
53:                 # end
54:                 # self.guid = "#{site_url}/?#{type}=#{self.id}"
55:                 
56:                 urlify = self.post_title.dup.downcase.gsub(' ', '-')
57:                 self.post_name = urlify
58:         end
update_date() click to toggle source
    # File lib/wpb/pagepost.rb, line 60
60:         def update_date
61:                 t = Time.now
62:                 self.post_modified = t
63:                 self.post_modified_gmt = t.gmtime
64:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.