Class: Wee::ExternalResource
Instance Method Summary collapse
-
#initialize(mount_path = nil) ⇒ ExternalResource
constructor
A new instance of ExternalResource.
- #install(builder) ⇒ Object
- #javascripts ⇒ Object
- #stylesheets ⇒ Object
Constructor Details
#initialize(mount_path = nil) ⇒ ExternalResource
Returns a new instance of ExternalResource.
4 5 6 |
# File 'lib/wee/external_resource.rb', line 4 def initialize(mount_path=nil) @mount_path = mount_path || "/" + self.class.name.to_s.downcase.gsub("::", "_") end |
Instance Method Details
#install(builder) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/wee/external_resource.rb', line 8 def install(builder) rd = resource_dir() builder.map(@mount_path) do run Rack::File.new(rd) end end |
#javascripts ⇒ Object
15 16 17 |
# File 'lib/wee/external_resource.rb', line 15 def javascripts [] end |
#stylesheets ⇒ Object
19 20 21 |
# File 'lib/wee/external_resource.rb', line 19 def stylesheets [] end |