Class: FolderObject

Inherits:
Object
  • Object
show all
Includes:
DataFactory, Foundry, StringFactory, Workflows
Defined in:
lib/sambal-cle/data_objects/resource.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 = {}) ⇒ FolderObject

Returns a new instance of FolderObject.



46
47
48
49
50
51
52
53
54
55
56
# File 'lib/sambal-cle/data_objects/resource.rb', line 46

def initialize(browser, opts={})
  @browser = browser

  defaults = {
      :name=>random_alphanums
  }
  options = defaults.merge(opts)

  set_options(options)
  requires @site
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



44
45
46
# File 'lib/sambal-cle/data_objects/resource.rb', line 44

def name
  @name
end

#parent_folderObject

Returns the value of attribute parent_folder.



44
45
46
# File 'lib/sambal-cle/data_objects/resource.rb', line 44

def parent_folder
  @parent_folder
end

#siteObject

Returns the value of attribute site.



44
45
46
# File 'lib/sambal-cle/data_objects/resource.rb', line 44

def site
  @site
end

Instance Method Details

#createObject



58
59
60
61
62
63
64
65
66
67
68
# File 'lib/sambal-cle/data_objects/resource.rb', line 58

def create
  open_my_site_by_name @site
  resources
  on_page Resources do |page|
    page.create_subfolders_in @parent_folder
  end
  on_page CreateFolders do |page|
    page.folder_name.set @name
    page.create_folders_now
  end
end