Class: ModuleObject
- Inherits:
-
Object
- Object
- ModuleObject
- Includes:
- DataFactory, Foundry, StringFactory, Workflows
- Defined in:
- lib/sambal-cle/data_objects/lesson.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#end_date ⇒ Object
Returns the value of attribute end_date.
-
#href ⇒ Object
Returns the value of attribute href.
-
#keywords ⇒ Object
Returns the value of attribute keywords.
-
#site ⇒ Object
Returns the value of attribute site.
-
#start_date ⇒ Object
Returns the value of attribute start_date.
-
#title ⇒ Object
(also: #name)
Returns the value of attribute title.
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize(browser, opts = {}) ⇒ ModuleObject
constructor
A new instance of ModuleObject.
Methods included from Workflows
menu_link, #open_my_site_by_name, #reset
Constructor Details
#initialize(browser, opts = {}) ⇒ ModuleObject
Returns a new instance of ModuleObject.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/sambal-cle/data_objects/lesson.rb', line 10 def initialize(browser, opts={}) @browser = browser defaults = { :title=>random_alphanums } = defaults.merge(opts) () requires @site end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
8 9 10 |
# File 'lib/sambal-cle/data_objects/lesson.rb', line 8 def description @description end |
#end_date ⇒ Object
Returns the value of attribute end_date.
8 9 10 |
# File 'lib/sambal-cle/data_objects/lesson.rb', line 8 def end_date @end_date end |
#href ⇒ Object
Returns the value of attribute href.
8 9 10 |
# File 'lib/sambal-cle/data_objects/lesson.rb', line 8 def href @href end |
#keywords ⇒ Object
Returns the value of attribute keywords.
8 9 10 |
# File 'lib/sambal-cle/data_objects/lesson.rb', line 8 def keywords @keywords end |
#site ⇒ Object
Returns the value of attribute site.
8 9 10 |
# File 'lib/sambal-cle/data_objects/lesson.rb', line 8 def site @site end |
#start_date ⇒ Object
Returns the value of attribute start_date.
8 9 10 |
# File 'lib/sambal-cle/data_objects/lesson.rb', line 8 def start_date @start_date end |
#title ⇒ Object Also known as: name
Returns the value of attribute title.
8 9 10 |
# File 'lib/sambal-cle/data_objects/lesson.rb', line 8 def title @title end |
Instance Method Details
#create ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/sambal-cle/data_objects/lesson.rb', line 24 def create open_my_site_by_name @site lessons reset on_page Lessons do |page| page.add_module end on_page AddEditModule do |page| page.title.set @title page.description.set @description page.keywords.set @keywords page.start_date.set @start_date page.end_date.set @end_date page.add end on_page ConfirmModule do |page| page.return_to_modules end on_page Lessons do |list| @href = list.href @title end end |