Method: PandaPal::Organization#platform_api

Defined in:
app/models/panda_pal/organization.rb

#platform_api(platform_type = primary_platform) ⇒ Object

Retrieve the specified Platform API for this Organization. If only a single Platform is used (when lti_options is a constant string or nil), passing the platform_type is unnecessary

The API is currently an Organization subclass (using ‘becomes()`), but such may change.



141
142
143
144
145
146
# File 'app/models/panda_pal/organization.rb', line 141

def platform_api(platform_type = primary_platform)
  return nil if platform_type.nil?
  scl = platform_type.organization_api
  return self if scl == self.class
  becomes(scl)
end