Class: IMS::LTI::Models::Vendor

Inherits:
LTIModel
  • Object
show all
Defined in:
lib/ims/lti/models/vendor.rb

Constant Summary

Constants inherited from LTIModel

LTIModel::LTI_VERSION_2P0, LTIModel::LTI_VERSION_2P1

Instance Method Summary collapse

Methods inherited from LTIModel

add_attribute, add_attributes, #as_json, #attributes, #attributes=, #from_json, from_json, inherit_attributes, inherited, #initialize, #method_missing, #to_json

Constructor Details

This class inherits a constructor from IMS::LTI::Models::LTIModel

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class IMS::LTI::Models::LTIModel

Instance Method Details

#create_description(name, key = 'vendor.description') ⇒ Object



15
16
17
# File 'lib/ims/lti/models/vendor.rb', line 15

def create_description(name, key = 'vendor.description')
  @description = LocalizedText.new(name, key)
end

#create_vendor_name(name, key = 'vendor.name') ⇒ Object



11
12
13
# File 'lib/ims/lti/models/vendor.rb', line 11

def create_vendor_name(name, key = 'vendor.name')
  @vendor_name = LocalizedName.new(name, key)
end

#default_descriptionObject



23
24
25
# File 'lib/ims/lti/models/vendor.rb', line 23

def default_description
  description && description.default_value
end

#default_nameObject



19
20
21
# File 'lib/ims/lti/models/vendor.rb', line 19

def default_name
  vendor_name && vendor_name.default_value
end