Class: GroupObject
- Inherits:
-
Object
- Object
- GroupObject
- Includes:
- DataFactory, Foundry, Navigation, StringFactory
- Defined in:
- lib/kuality-coeus/data_objects/identity/group.rb
Instance Attribute Summary collapse
-
#assignees ⇒ Object
Returns the value of attribute assignees.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#principal_name ⇒ Object
Returns the value of attribute principal_name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #add_assignee(opts = {}) ⇒ Object
- #create ⇒ Object
-
#initialize(browser, opts = {}) ⇒ GroupObject
constructor
A new instance of GroupObject.
- #view ⇒ Object
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 = {}) ⇒ GroupObject
Returns a new instance of GroupObject.
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/kuality-coeus/data_objects/identity/group.rb', line 11 def initialize(browser, opts={}) @browser = browser defaults = { type: 'Default', namespace: 'KC-UNT - Kuali Coeus - Department', name: random_alphanums, assignees: collection('GrAssignees') } (defaults.merge(opts)) end |
Instance Attribute Details
#assignees ⇒ Object
Returns the value of attribute assignees.
8 9 10 |
# File 'lib/kuality-coeus/data_objects/identity/group.rb', line 8 def assignees @assignees end |
#id ⇒ Object
Returns the value of attribute id.
8 9 10 |
# File 'lib/kuality-coeus/data_objects/identity/group.rb', line 8 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/kuality-coeus/data_objects/identity/group.rb', line 8 def name @name end |
#namespace ⇒ Object
Returns the value of attribute namespace.
8 9 10 |
# File 'lib/kuality-coeus/data_objects/identity/group.rb', line 8 def namespace @namespace end |
#principal_name ⇒ Object
Returns the value of attribute principal_name.
8 9 10 |
# File 'lib/kuality-coeus/data_objects/identity/group.rb', line 8 def principal_name @principal_name end |
#type ⇒ Object
Returns the value of attribute type.
8 9 10 |
# File 'lib/kuality-coeus/data_objects/identity/group.rb', line 8 def type @type end |
Instance Method Details
#add_assignee(opts = {}) ⇒ Object
35 36 37 38 |
# File 'lib/kuality-coeus/data_objects/identity/group.rb', line 35 def add_assignee(opts={}) view @assignees.add opts end |
#create ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/kuality-coeus/data_objects/identity/group.rb', line 24 def create visit(SystemAdmin).group on(GroupLookup).create_new on Group do |page| page.description.set random_alphanums @id=page.id fill_out page, :namespace, :name page.blanket_approve end end |
#view ⇒ Object
40 41 42 43 44 45 46 47 |
# File 'lib/kuality-coeus/data_objects/identity/group.rb', line 40 def view visit(SystemAdmin).group on GroupLookup do |page| page.group_id.set @id page.search page.edit_item @name end end |