Class: Stormpath::Rails::Config::ApplicationResolution
- Inherits:
-
Object
- Object
- Stormpath::Rails::Config::ApplicationResolution
- Defined in:
- lib/stormpath/rails/config/application_resolution.rb
Constant Summary collapse
- AUTOMATIC_RESOLUTION_ERROR_MESSAGE =
'Could not automatically resolve a Stormpath Application. '\ 'Please specify your Stormpath Application in your configuration.'.freeze
Instance Attribute Summary collapse
-
#href ⇒ Object
readonly
Returns the value of attribute href.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #app ⇒ Object
-
#initialize(href, name) ⇒ ApplicationResolution
constructor
A new instance of ApplicationResolution.
Constructor Details
#initialize(href, name) ⇒ ApplicationResolution
Returns a new instance of ApplicationResolution.
11 12 13 14 |
# File 'lib/stormpath/rails/config/application_resolution.rb', line 11 def initialize(href, name) @href = href @name = name end |
Instance Attribute Details
#href ⇒ Object (readonly)
Returns the value of attribute href.
5 6 7 |
# File 'lib/stormpath/rails/config/application_resolution.rb', line 5 def href @href end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/stormpath/rails/config/application_resolution.rb', line 5 def name @name end |
Instance Method Details
#app ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/stormpath/rails/config/application_resolution.rb', line 16 def app if href.present? app_from_href elsif name.present? app_from_name else automatic_resolution end end |