Class: ActBlue::Page
Constant Summary
collapse
- XML_NAME =
'page'
- ATTRIBUTES =
['name', 'partner', 'created-on']
- ELEMENTS =
['title', 'author', 'blurb', 'visibility', 'showcandidatesummary', 'listentries']
Constants inherited
from ActiveBlue
ActiveBlue::ACT_TYPES
Instance Attribute Summary
Attributes inherited from ActiveBlue
#variables
Instance Method Summary
collapse
Methods inherited from ActiveBlue
#[], #[]=, #initialize, #to_xml, #to_xml_element
Instance Method Details
#delete ⇒ Object
17
18
19
20
|
# File 'lib/actblue/page.rb', line 17
def delete
@variables['visibility'] = "archived"
ActiveBlue.put("/pages/#{@variables['name']}", :body => to_xml) if @variables['name']
end
|
#post ⇒ Object
9
10
11
|
# File 'lib/actblue/page.rb', line 9
def post
ActiveBlue.post('/pages', :body => to_xml)
end
|
#put ⇒ Object
13
14
15
|
# File 'lib/actblue/page.rb', line 13
def put
ActiveBlue.put("/pages/#{@variables['name']}", :body => to_xml) if @variables['name']
end
|