Class: KktixEvent::Organization

Inherits:
Object
  • Object
show all
Defined in:
lib/kktix-api/organization.rb

Overview

Single organization on KKTIX

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(organization_data, oid: nil) ⇒ Organization

Returns a new instance of Organization.



10
11
12
# File 'lib/kktix-api/organization.rb', line 10

def initialize(organization_data, oid: nil)
  update_info(organization_data, oid)
end

Instance Attribute Details

#eventsObject (readonly)

Returns the value of attribute events.



8
9
10
# File 'lib/kktix-api/organization.rb', line 8

def events
  @events
end

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/kktix-api/organization.rb', line 8

def name
  @name
end

#oidObject (readonly)

Returns the value of attribute oid.



8
9
10
# File 'lib/kktix-api/organization.rb', line 8

def oid
  @oid
end

#uriObject (readonly)

Returns the value of attribute uri.



8
9
10
# File 'lib/kktix-api/organization.rb', line 8

def uri
  @uri
end

Class Method Details

.find(oid = nil) ⇒ Object



14
15
16
17
# File 'lib/kktix-api/organization.rb', line 14

def self.find(oid = nil)
  organization_data = KktixEvent::KktixApi.events(oid)
  new(organization_data, oid: oid)
end