Class: Senkyoshi::Configuration
- Inherits:
-
Object
- Object
- Senkyoshi::Configuration
- Defined in:
- lib/senkyoshi/configuration.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
Returns the value of attribute account_id.
-
#canvas_token ⇒ Object
Returns the value of attribute canvas_token.
-
#canvas_url ⇒ Object
Returns the value of attribute canvas_url.
-
#scorm_launch_url ⇒ Object
Returns the value of attribute scorm_launch_url.
-
#scorm_shared_auth ⇒ Object
Returns the value of attribute scorm_shared_auth.
-
#scorm_url ⇒ Object
Returns the value of attribute scorm_url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
12 13 14 15 16 17 18 19 |
# File 'lib/senkyoshi/configuration.rb', line 12 def initialize @canvas_url = Configuration._config[:canvas_url] @canvas_token = Configuration._config[:canvas_token] @account_id = Configuration._config[:account_id] || :self @scorm_url = Configuration._config[:scorm_url] @scorm_launch_url = Configuration._config[:scorm_launch_url] @scorm_shared_auth = Configuration._config[:scorm_shared_auth] end |
Instance Attribute Details
#account_id ⇒ Object
Returns the value of attribute account_id.
7 8 9 |
# File 'lib/senkyoshi/configuration.rb', line 7 def account_id @account_id end |
#canvas_token ⇒ Object
Returns the value of attribute canvas_token.
6 7 8 |
# File 'lib/senkyoshi/configuration.rb', line 6 def canvas_token @canvas_token end |
#canvas_url ⇒ Object
Returns the value of attribute canvas_url.
5 6 7 |
# File 'lib/senkyoshi/configuration.rb', line 5 def canvas_url @canvas_url end |
#scorm_launch_url ⇒ Object
Returns the value of attribute scorm_launch_url.
9 10 11 |
# File 'lib/senkyoshi/configuration.rb', line 9 def scorm_launch_url @scorm_launch_url end |
#scorm_shared_auth ⇒ Object
Returns the value of attribute scorm_shared_auth.
10 11 12 |
# File 'lib/senkyoshi/configuration.rb', line 10 def scorm_shared_auth @scorm_shared_auth end |
#scorm_url ⇒ Object
Returns the value of attribute scorm_url.
8 9 10 |
# File 'lib/senkyoshi/configuration.rb', line 8 def scorm_url @scorm_url end |
Class Method Details
._config ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/senkyoshi/configuration.rb', line 21 def self._config @config ||= if File.exists? "senkyoshi.yml" YAML::load(File.read("senkyoshi.yml")) else {} end end |