Class: IMS::LTI::Services::ToolConsumerProfileService

Inherits:
Object
  • Object
show all
Defined in:
lib/ims/lti/services/tool_consumer_profile_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tool_consumer_profile) ⇒ ToolConsumerProfileService

Returns a new instance of ToolConsumerProfileService.



6
7
8
# File 'lib/ims/lti/services/tool_consumer_profile_service.rb', line 6

def initialize(tool_consumer_profile)
  @tcp = tool_consumer_profile
end

Instance Attribute Details

#tcpObject

Returns the value of attribute tcp.



4
5
6
# File 'lib/ims/lti/services/tool_consumer_profile_service.rb', line 4

def tcp
  @tcp
end

Instance Method Details

#supports_capabilities?(capability, *capabilities) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
13
# File 'lib/ims/lti/services/tool_consumer_profile_service.rb', line 10

def supports_capabilities?(capability, *capabilities)
  capabilities.unshift(capability)
  (capabilities - tcp.capabilities_offered).empty?
end