Class: BistroCar::Bundle
- Inherits:
-
Object
- Object
- BistroCar::Bundle
- Defined in:
- lib/bistro_car/bundle.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #file_paths ⇒ Object
-
#initialize(name) ⇒ Bundle
constructor
A new instance of Bundle.
- #javascript_url ⇒ Object
- #to_javascript ⇒ Object
Constructor Details
#initialize(name) ⇒ Bundle
Returns a new instance of Bundle.
5 6 7 |
# File 'lib/bistro_car/bundle.rb', line 5 def initialize(name) @name = name.to_sym end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/bistro_car/bundle.rb', line 3 def name @name end |
Instance Method Details
#file_paths ⇒ Object
9 10 11 |
# File 'lib/bistro_car/bundle.rb', line 9 def file_paths Dir.glob(path.join('*.coffee')).to_a end |
#javascript_url ⇒ Object
17 18 19 |
# File 'lib/bistro_car/bundle.rb', line 17 def javascript_url "/javascripts/bundle/#{name}.js" end |