Class: Devise::CasActionUrlFactoryBase
- Inherits:
-
Object
- Object
- Devise::CasActionUrlFactoryBase
- Defined in:
- lib/cms/configuration/devise.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#base_url ⇒ Object
readonly
Returns the value of attribute base_url.
-
#mapping ⇒ Object
readonly
Returns the value of attribute mapping.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object (also: #build)
-
#initialize(base_url, mapping, action) ⇒ CasActionUrlFactoryBase
constructor
A new instance of CasActionUrlFactoryBase.
Constructor Details
#initialize(base_url, mapping, action) ⇒ CasActionUrlFactoryBase
Returns a new instance of CasActionUrlFactoryBase.
278 279 280 281 282 |
# File 'lib/cms/configuration/devise.rb', line 278 def initialize(base_url, mapping, action) @base_url = base_url @mapping = mapping @action = action end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
269 270 271 |
# File 'lib/cms/configuration/devise.rb', line 269 def action @action end |
#base_url ⇒ Object (readonly)
Returns the value of attribute base_url.
269 270 271 |
# File 'lib/cms/configuration/devise.rb', line 269 def base_url @base_url end |
#mapping ⇒ Object (readonly)
Returns the value of attribute mapping.
269 270 271 |
# File 'lib/cms/configuration/devise.rb', line 269 def mapping @mapping end |
Class Method Details
.prepare_class ⇒ Object
271 272 273 274 275 276 |
# File 'lib/cms/configuration/devise.rb', line 271 def self.prepare_class Class.new(self) do include Rails.application.routes.url_helpers include Rails.application.routes.mounted_helpers if Rails.application.routes.try(:mounted_helpers) end end |
Instance Method Details
#call ⇒ Object Also known as: build
284 285 286 287 288 |
# File 'lib/cms/configuration/devise.rb', line 284 def call uri = URI.parse(base_url).tap { |uri| uri.query = nil } uri.path = load_base_path uri.to_s end |