Class: CollinsShell::Util::AssetStache
- Inherits:
-
Mustache
- Object
- Mustache
- CollinsShell::Util::AssetStache
- Defined in:
- lib/collins_shell/util/asset_stache.rb
Instance Attribute Summary collapse
-
#asset ⇒ Object
Returns the value of attribute asset.
Instance Method Summary collapse
-
#initialize(asset) ⇒ AssetStache
constructor
A new instance of AssetStache.
- #method_missing(meth, *args, &block) ⇒ Object
- #respond_to?(meth) ⇒ Boolean
Constructor Details
#initialize(asset) ⇒ AssetStache
Returns a new instance of AssetStache.
8 9 10 |
# File 'lib/collins_shell/util/asset_stache.rb', line 8 def initialize asset @asset = asset end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/collins_shell/util/asset_stache.rb', line 21 def method_missing meth, *args, &block result = asset.send(meth.to_sym) if result.nil? then super else result end end |
Instance Attribute Details
#asset ⇒ Object
Returns the value of attribute asset.
6 7 8 |
# File 'lib/collins_shell/util/asset_stache.rb', line 6 def asset @asset end |
Instance Method Details
#respond_to?(meth) ⇒ Boolean
12 13 14 15 16 17 18 19 |
# File 'lib/collins_shell/util/asset_stache.rb', line 12 def respond_to? meth result = asset.send(meth.to_sym) if result.nil? then super else result end end |