Class: LtiXml::BasePlatform
- Inherits:
-
Object
- Object
- LtiXml::BasePlatform
- Defined in:
- app/lib/lti_xml/base_platform.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#main_app ⇒ Object
Returns the value of attribute main_app.
-
#parsed_request_url ⇒ Object
Returns the value of attribute parsed_request_url.
-
#platform ⇒ Object
Returns the value of attribute platform.
Instance Method Summary collapse
-
#initialize(platform, full_request_url, main_app) ⇒ BasePlatform
constructor
A new instance of BasePlatform.
-
#xml ⇒ Object
Override one of the following formatter methods in your individual platform class, or if you must, you can override the whole xml method and do it all custom.
Constructor Details
#initialize(platform, full_request_url, main_app) ⇒ BasePlatform
Returns a new instance of BasePlatform.
5 6 7 8 9 |
# File 'app/lib/lti_xml/base_platform.rb', line 5 def initialize(platform, full_request_url, main_app) @platform = platform @parsed_request_url = URI.parse(full_request_url) @main_app = main_app end |
Instance Attribute Details
#main_app ⇒ Object
Returns the value of attribute main_app.
3 4 5 |
# File 'app/lib/lti_xml/base_platform.rb', line 3 def main_app @main_app end |
#parsed_request_url ⇒ Object
Returns the value of attribute parsed_request_url.
3 4 5 |
# File 'app/lib/lti_xml/base_platform.rb', line 3 def parsed_request_url @parsed_request_url end |
#platform ⇒ Object
Returns the value of attribute platform.
3 4 5 |
# File 'app/lib/lti_xml/base_platform.rb', line 3 def platform @platform end |
Instance Method Details
#xml ⇒ Object
Override one of the following formatter methods in your individual platform class, or if you must, you can override the whole xml method and do it all custom.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/lib/lti_xml/base_platform.rb', line 13 def xml ims_tool_config add_domain add_privacy_level add_lti_properties add_lti_custom_params add_lti_nav add_environments #strip the launch url xml = @tc.to_xml xml = xml.sub(/<blti:launch_url>.*<\/blti:launch_url>/, '') if PandaPal.[:launch_url] === false return xml end |