Class: AuthRocket::Org

Inherits:
Resource
  • Object
show all
Defined in:
lib/authrocket/org.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#customObject (readonly)

Returns the value of attribute custom.



10
11
12
# File 'lib/authrocket/org.rb', line 10

def custom
  @custom
end

#nameObject (readonly)

Returns the value of attribute name.



10
11
12
# File 'lib/authrocket/org.rb', line 10

def name
  @name
end

#referenceObject (readonly)

Returns the value of attribute reference.



10
11
12
# File 'lib/authrocket/org.rb', line 10

def reference
  @reference
end

#stateObject (readonly)

Returns the value of attribute state.



10
11
12
# File 'lib/authrocket/org.rb', line 10

def state
  @state
end

Instance Method Details

#find_user(uid) ⇒ Object



18
19
20
# File 'lib/authrocket/org.rb', line 18

def find_user(uid)
  users.detect{|u| u.id == uid } || raise(RecordNotFound)
end

#usersObject



14
15
16
# File 'lib/authrocket/org.rb', line 14

def users
  memberships.map(&:user)
end