Class: IPReviewObject
- Inherits:
-
Object
- Object
- IPReviewObject
- Includes:
- DataFactory, DateFactory, Foundry, Navigation, StringFactory
- Defined in:
- lib/kuality-coeus/data_objects/institutional_proposal/intellectual_property_review.rb
Instance Attribute Summary collapse
-
#activities ⇒ Object
Returns the value of attribute activities.
-
#document_id ⇒ Object
Returns the value of attribute document_id.
-
#reviewer ⇒ Object
Returns the value of attribute reviewer.
-
#submitted_for_review ⇒ Object
Returns the value of attribute submitted_for_review.
Instance Method Summary collapse
-
#create ⇒ Object
This method only “saves” the IPReview.
-
#initialize(browser, opts = {}) ⇒ IPReviewObject
constructor
A new instance of IPReviewObject.
- #submit ⇒ Object
Methods included from Navigation
#doc_search, #fill_out, #on_document?, #on_page?, #open_document
Methods included from Utilities
#get, #make_role, #make_user, #random_percentage, #set, #snake_case
Constructor Details
#initialize(browser, opts = {}) ⇒ IPReviewObject
Returns a new instance of IPReviewObject.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/kuality-coeus/data_objects/institutional_proposal/intellectual_property_review.rb', line 11 def initialize(browser, opts={}) @browser = browser defaults = { reviewer: '::random::', submitted_for_review: right_now, # Note: this is the date hash, not the string with slashes activities: [{number: '1', type_code: '::random::'}] } (defaults.merge(opts)) requires :document_id end |
Instance Attribute Details
#activities ⇒ Object
Returns the value of attribute activities.
9 10 11 |
# File 'lib/kuality-coeus/data_objects/institutional_proposal/intellectual_property_review.rb', line 9 def activities @activities end |
#document_id ⇒ Object
Returns the value of attribute document_id.
9 10 11 |
# File 'lib/kuality-coeus/data_objects/institutional_proposal/intellectual_property_review.rb', line 9 def document_id @document_id end |
#reviewer ⇒ Object
Returns the value of attribute reviewer.
9 10 11 |
# File 'lib/kuality-coeus/data_objects/institutional_proposal/intellectual_property_review.rb', line 9 def reviewer @reviewer end |
#submitted_for_review ⇒ Object
Returns the value of attribute submitted_for_review.
9 10 11 |
# File 'lib/kuality-coeus/data_objects/institutional_proposal/intellectual_property_review.rb', line 9 def submitted_for_review @submitted_for_review end |
Instance Method Details
#create ⇒ Object
This method only “saves” the IPReview. You must submit or blanket approve it before it actually does anything useful
24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/kuality-coeus/data_objects/institutional_proposal/intellectual_property_review.rb', line 24 def create # TODO: Add helper navigation method(s) here on IPReview do |page| page.description.set random_alphanums # Note: The description field on this page is required, but seems irrelevant to anything important, at least at the moment page.submitted_for_review.set @submitted_for_review[:date_w_slashes] @activities.each do |activity| page.activity_number.set activity[:number] page.ip_review_activity_type_code.pick! activity[:type_code] # TODO: Obviously add more here as needed end end set_reviewer on(IPReview).save end |
#submit ⇒ Object
39 40 41 |
# File 'lib/kuality-coeus/data_objects/institutional_proposal/intellectual_property_review.rb', line 39 def submit on(IPReview).submit end |