Class: GroupObject

Inherits:
Object
  • Object
show all
Includes:
DataFactory, Foundry, Navigation, StringFactory
Defined in:
lib/kuality-coeus/data_objects/identity/group.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Navigation

#doc_search, #fill_out, #fill_out_item, #on_document?, #on_page?, #open_document

Methods included from Utilities

#get, #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
23
# File 'lib/kuality-coeus/data_objects/identity/group.rb', line 11

def initialize(browser, opts={})
  @browser = browser

  defaults = {
    type:        'Default',
    namespace:   '::random::',
    name:        random_alphanums,
    description: random_alphanums,
    assignees:   AssigneesCollection.new
  }

  set_options(defaults.merge(opts))
end

Instance Attribute Details

#assigneesObject

Returns the value of attribute assignees.



8
9
10
# File 'lib/kuality-coeus/data_objects/identity/group.rb', line 8

def assignees
  @assignees
end

#descriptionObject

Returns the value of attribute description.



8
9
10
# File 'lib/kuality-coeus/data_objects/identity/group.rb', line 8

def description
  @description
end

#idObject

Returns the value of attribute id.



8
9
10
# File 'lib/kuality-coeus/data_objects/identity/group.rb', line 8

def id
  @id
end

#nameObject

Returns the value of attribute name.



8
9
10
# File 'lib/kuality-coeus/data_objects/identity/group.rb', line 8

def name
  @name
end

#namespaceObject

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_nameObject

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

#typeObject

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



29
30
31
32
33
# File 'lib/kuality-coeus/data_objects/identity/group.rb', line 29

def add_assignee(opts={})
  assignee = make AssigneeObject, opts
  assignee.create
  @assignees << assignee
end

#createObject



25
26
27
# File 'lib/kuality-coeus/data_objects/identity/group.rb', line 25

def create

end