Class: RailsDevtools::Pin
- Inherits:
-
Object
- Object
- RailsDevtools::Pin
- Defined in:
- lib/rails_devtools/importmaps/base.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#preload ⇒ Object
readonly
Returns the value of attribute preload.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
-
#vendor ⇒ Object
readonly
Returns the value of attribute vendor.
Instance Method Summary collapse
- #file_path ⇒ Object
-
#initialize(name, to, preload, vendor) ⇒ Pin
constructor
A new instance of Pin.
- #path ⇒ Object
Constructor Details
#initialize(name, to, preload, vendor) ⇒ Pin
Returns a new instance of Pin.
53 54 55 56 57 58 |
# File 'lib/rails_devtools/importmaps/base.rb', line 53 def initialize(name, to, preload, vendor) @name = name @to = to @preload = preload @vendor = vendor end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
51 52 53 |
# File 'lib/rails_devtools/importmaps/base.rb', line 51 def name @name end |
#preload ⇒ Object (readonly)
Returns the value of attribute preload.
51 52 53 |
# File 'lib/rails_devtools/importmaps/base.rb', line 51 def preload @preload end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
51 52 53 |
# File 'lib/rails_devtools/importmaps/base.rb', line 51 def to @to end |
#vendor ⇒ Object (readonly)
Returns the value of attribute vendor.
51 52 53 |
# File 'lib/rails_devtools/importmaps/base.rb', line 51 def vendor @vendor end |
Instance Method Details
#file_path ⇒ Object
60 61 62 |
# File 'lib/rails_devtools/importmaps/base.rb', line 60 def file_path @file_path ||= @vendor ? vendor_path_to(to) : local_javascript_path_to(to) end |
#path ⇒ Object
64 65 66 |
# File 'lib/rails_devtools/importmaps/base.rb', line 64 def path @path ||= frontend_path(to) end |