Class: BlogEntryObject

Inherits:
Object
  • Object
show all
Includes:
Foundry, StringFactory, Workflows
Defined in:
lib/sambal-cle/data_objects/blog.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Workflows

menu_link, #open_my_site_by_name, #reset

Constructor Details

#initialize(browser, opts = {}) ⇒ BlogEntryObject

Returns a new instance of BlogEntryObject.



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/sambal-cle/data_objects/blog.rb', line 9

def initialize(browser, opts={})
  @browser = browser
  
  defaults = {
    :title=>random_alphanums,
    :content=>random_alphanums,
    :permissions=>:publicly_viewable
  }
  options = defaults.merge(opts)
  
  set_options(options)
  requirements @site
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



7
8
9
# File 'lib/sambal-cle/data_objects/blog.rb', line 7

def content
  @content
end

#permissionsObject

Returns the value of attribute permissions.



7
8
9
# File 'lib/sambal-cle/data_objects/blog.rb', line 7

def permissions
  @permissions
end

#siteObject

Returns the value of attribute site.



7
8
9
# File 'lib/sambal-cle/data_objects/blog.rb', line 7

def site
  @site
end

#titleObject

Returns the value of attribute title.



7
8
9
# File 'lib/sambal-cle/data_objects/blog.rb', line 7

def title
  @title
end

Instance Method Details

#createObject



23
24
25
26
27
# File 'lib/sambal-cle/data_objects/blog.rb', line 23

def create
  open_my_site_by_name @site
  blogs
  # TODO: More needed here
end

#deleteObject



37
38
39
# File 'lib/sambal-cle/data_objects/blog.rb', line 37

def delete
  
end

#edit(opts = {}) ⇒ Object



29
30
31
# File 'lib/sambal-cle/data_objects/blog.rb', line 29

def edit opts={}
  
end

#viewObject



33
34
35
# File 'lib/sambal-cle/data_objects/blog.rb', line 33

def view
  
end