Class: Lita::GoogleOrganisationUnit

Inherits:
Object
  • Object
show all
Defined in:
lib/lita/google_organisation_unit.rb

Overview

A google OrganisationUnit, contains zero or more users

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, path:) ⇒ GoogleOrganisationUnit

Returns a new instance of GoogleOrganisationUnit.



12
13
14
# File 'lib/lita/google_organisation_unit.rb', line 12

def initialize(name:, path:)
  @name, @path = name, path
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/lita/google_organisation_unit.rb', line 4

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



4
5
6
# File 'lib/lita/google_organisation_unit.rb', line 4

def path
  @path
end

Class Method Details

.from_api(item) ⇒ Object



6
7
8
9
10
# File 'lib/lita/google_organisation_unit.rb', line 6

def self.from_api(item)
  GoogleOrganisationUnit.new(
    name: item.name, path: item.org_unit_path
  )
end