Class: ProposalLogObject
- Inherits:
-
Object
- Object
- ProposalLogObject
- Includes:
- DataFactory, Foundry, Navigation, StringFactory
- Defined in:
- lib/kuality-coeus/data_objects/proposal_log/proposal_log.rb
Instance Attribute Summary collapse
-
#lead_unit ⇒ Object
Returns the value of attribute lead_unit.
-
#log_status ⇒ Object
Returns the value of attribute log_status.
-
#log_type ⇒ Object
Returns the value of attribute log_type.
-
#number ⇒ Object
Returns the value of attribute number.
-
#principal_investigator ⇒ Object
Returns the value of attribute principal_investigator.
-
#proposal_type ⇒ Object
Returns the value of attribute proposal_type.
-
#sponsor_id ⇒ Object
Returns the value of attribute sponsor_id.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize(browser, opts = {}) ⇒ ProposalLogObject
constructor
A new instance of ProposalLogObject.
Methods included from Navigation
#doc_search, #fill_out, #fill_out_item, #on_document?, #on_page?, #open_document, #window_cleanup
Methods included from Utilities
#get, #make_role, #make_user, #random_percentage, #set, #snake_case
Constructor Details
#initialize(browser, opts = {}) ⇒ ProposalLogObject
Returns a new instance of ProposalLogObject.
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/kuality-coeus/data_objects/proposal_log/proposal_log.rb', line 11 def initialize(browser, opts={}) @browser= browser defaults = { log_type: 'Permanent', proposal_type: '::random::', sponsor_id: '::random::', title: random_alphanums, lead_unit: '000001', } (defaults.merge(opts)) end |
Instance Attribute Details
#lead_unit ⇒ Object
Returns the value of attribute lead_unit.
8 9 10 |
# File 'lib/kuality-coeus/data_objects/proposal_log/proposal_log.rb', line 8 def lead_unit @lead_unit end |
#log_status ⇒ Object
Returns the value of attribute log_status.
8 9 10 |
# File 'lib/kuality-coeus/data_objects/proposal_log/proposal_log.rb', line 8 def log_status @log_status end |
#log_type ⇒ Object
Returns the value of attribute log_type.
8 9 10 |
# File 'lib/kuality-coeus/data_objects/proposal_log/proposal_log.rb', line 8 def log_type @log_type end |
#number ⇒ Object
Returns the value of attribute number.
8 9 10 |
# File 'lib/kuality-coeus/data_objects/proposal_log/proposal_log.rb', line 8 def number @number end |
#principal_investigator ⇒ Object
Returns the value of attribute principal_investigator.
8 9 10 |
# File 'lib/kuality-coeus/data_objects/proposal_log/proposal_log.rb', line 8 def principal_investigator @principal_investigator end |
#proposal_type ⇒ Object
Returns the value of attribute proposal_type.
8 9 10 |
# File 'lib/kuality-coeus/data_objects/proposal_log/proposal_log.rb', line 8 def proposal_type @proposal_type end |
#sponsor_id ⇒ Object
Returns the value of attribute sponsor_id.
8 9 10 |
# File 'lib/kuality-coeus/data_objects/proposal_log/proposal_log.rb', line 8 def sponsor_id @sponsor_id end |
#title ⇒ Object
Returns the value of attribute title.
8 9 10 |
# File 'lib/kuality-coeus/data_objects/proposal_log/proposal_log.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 |
# File 'lib/kuality-coeus/data_objects/proposal_log/proposal_log.rb', line 24 def create visit(CentralAdmin).create_proposal_log set_principal_investigator on ProposalLog do |create| create. @number=create.proposal_number.strip @log_status=create.proposal_log_status.strip create.description.set random_alphanums create.proposal_log_type.pick! @log_type fill_out create, :proposal_type, :title, :lead_unit end set_sponsor_code on(ProposalLog).blanket_approve end |