Class: IMS::LTI::Models::ProductInfo
- Defined in:
- lib/ims/lti/models/product_info.rb
Constant Summary
Constants inherited from LTIModel
LTIModel::LTI_VERSION_2P0, LTIModel::LTI_VERSION_2P1
Instance Method Summary collapse
- #create_description(name, key = 'product.description') ⇒ Object
- #create_product_name(name, key = 'product.name') ⇒ Object
- #default_description ⇒ Object
- #default_name ⇒ Object
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 = 'product.description') ⇒ Object
13 14 15 |
# File 'lib/ims/lti/models/product_info.rb', line 13 def create_description(name, key = 'product.description') @description = LocalizedText.new(name, key) end |
#create_product_name(name, key = 'product.name') ⇒ Object
9 10 11 |
# File 'lib/ims/lti/models/product_info.rb', line 9 def create_product_name(name, key = 'product.name') @product_name = LocalizedName.new(name, key) end |
#default_description ⇒ Object
17 18 19 |
# File 'lib/ims/lti/models/product_info.rb', line 17 def default_description description && description.default_value end |
#default_name ⇒ Object
21 22 23 |
# File 'lib/ims/lti/models/product_info.rb', line 21 def default_name product_name && product_name.default_value end |