Class: LineAwesomeRails::AssetFinder
- Inherits:
-
Object
- Object
- LineAwesomeRails::AssetFinder
- Defined in:
- lib/line_awesome_rails/asset_finder.rb
Constant Summary collapse
- SVG_DIRECTORY =
File.(File.join(__dir__, "../../svgs"))
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(filename) ⇒ AssetFinder
constructor
A new instance of AssetFinder.
- #pathname ⇒ Object
Constructor Details
#initialize(filename) ⇒ AssetFinder
Returns a new instance of AssetFinder.
8 9 10 |
# File 'lib/line_awesome_rails/asset_finder.rb', line 8 def initialize(filename) @filename = filename end |
Class Method Details
.find_asset(filename) ⇒ Object
4 5 6 |
# File 'lib/line_awesome_rails/asset_finder.rb', line 4 def self.find_asset(filename) new(filename) end |
Instance Method Details
#pathname ⇒ Object
12 13 14 |
# File 'lib/line_awesome_rails/asset_finder.rb', line 12 def pathname Pathname.new File.join(SVG_DIRECTORY, @filename) end |