Class: FolderObject
- Inherits:
-
Object
- Object
- FolderObject
- Includes:
- DataFactory, Foundry, StringFactory, Workflows
- Defined in:
- lib/sambal-cle/data_objects/resource.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#parent_folder ⇒ Object
Returns the value of attribute parent_folder.
-
#site ⇒ Object
Returns the value of attribute site.
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize(browser, opts = {}) ⇒ FolderObject
constructor
A new instance of FolderObject.
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 } = defaults.merge(opts) () requires @site end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
44 45 46 |
# File 'lib/sambal-cle/data_objects/resource.rb', line 44 def name @name end |
#parent_folder ⇒ Object
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 |
#site ⇒ Object
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
#create ⇒ Object
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 |