Class: Sprockets::Helpers::BasePath
- Inherits:
-
Object
- Object
- Sprockets::Helpers::BasePath
- Defined in:
- lib/sprockets/helpers/base_path.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
The various options used when generating the path.
-
#uri ⇒ Object
readonly
The parsed URI from which to generate the full path to the asset.
Instance Method Summary collapse
-
#initialize(uri, options = {}) ⇒ BasePath
constructor
A new instance of BasePath.
- #sprockets_helpers_settings ⇒ Object
-
#to_s ⇒ Object
Returns the full path to the asset, complete with timestamp.
Constructor Details
#initialize(uri, options = {}) ⇒ BasePath
Returns a new instance of BasePath.
15 16 17 18 |
# File 'lib/sprockets/helpers/base_path.rb', line 15 def initialize(uri, = {}) @uri = uri @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
The various options used when generating the path.
12 13 14 |
# File 'lib/sprockets/helpers/base_path.rb', line 12 def @options end |
#uri ⇒ Object (readonly)
The parsed URI from which to generate the full path to the asset.
9 10 11 |
# File 'lib/sprockets/helpers/base_path.rb', line 9 def uri @uri end |
Instance Method Details
#sprockets_helpers_settings ⇒ Object
20 21 22 |
# File 'lib/sprockets/helpers/base_path.rb', line 20 def sprockets_helpers_settings @options[:sprockets_helpers_settings] end |
#to_s ⇒ Object
Returns the full path to the asset, complete with timestamp.
26 27 28 29 30 31 32 |
# File 'lib/sprockets/helpers/base_path.rb', line 26 def to_s rewrite_path rewrite_query rewrite_host uri.to_s end |