Class: DegreeObject
- Inherits:
-
Object
- Object
- DegreeObject
- Includes:
- DataFactory, Foundry, StringFactory
- Defined in:
- lib/kuality-coeus/data_objects/proposal_development/degrees.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#document_id ⇒ Object
Returns the value of attribute document_id.
-
#graduation_year ⇒ Object
Returns the value of attribute graduation_year.
-
#person ⇒ Object
Returns the value of attribute person.
-
#school ⇒ Object
Returns the value of attribute school.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize(browser, opts = {}) ⇒ DegreeObject
constructor
A new instance of DegreeObject.
Constructor Details
#initialize(browser, opts = {}) ⇒ DegreeObject
Returns a new instance of DegreeObject.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/kuality-coeus/data_objects/proposal_development/degrees.rb', line 10 def initialize(browser, opts={}) @browser = browser defaults = { type: '::random::', description: random_alphanums_plus, graduation_year: Time.random(year_range: 35).strftime('%Y') } (defaults.merge(opts)) requires :document_id, :person end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
7 8 9 |
# File 'lib/kuality-coeus/data_objects/proposal_development/degrees.rb', line 7 def description @description end |
#document_id ⇒ Object
Returns the value of attribute document_id.
7 8 9 |
# File 'lib/kuality-coeus/data_objects/proposal_development/degrees.rb', line 7 def document_id @document_id end |
#graduation_year ⇒ Object
Returns the value of attribute graduation_year.
7 8 9 |
# File 'lib/kuality-coeus/data_objects/proposal_development/degrees.rb', line 7 def graduation_year @graduation_year end |
#person ⇒ Object
Returns the value of attribute person.
7 8 9 |
# File 'lib/kuality-coeus/data_objects/proposal_development/degrees.rb', line 7 def person @person end |
#school ⇒ Object
Returns the value of attribute school.
7 8 9 |
# File 'lib/kuality-coeus/data_objects/proposal_development/degrees.rb', line 7 def school @school end |
#type ⇒ Object
Returns the value of attribute type.
7 8 9 |
# File 'lib/kuality-coeus/data_objects/proposal_development/degrees.rb', line 7 def type @type end |
Instance Method Details
#create ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/kuality-coeus/data_objects/proposal_development/degrees.rb', line 22 def create # This method assumes navigation was performed by the parent object on KeyPersonnel do |degrees| degrees. degrees.degree_type(@person).pick! @type degrees.degree_description(@person).fit @description fill_out_item @person, degrees, :graduation_year, :school degrees.add_degree(@person) end end |