Class: Rack::Bundle::CSSBundle
- Inherits:
-
Object
- Object
- Rack::Bundle::CSSBundle
- Defined in:
- lib/rack/bundle/css_bundle.rb
Instance Attribute Summary collapse
-
#contents ⇒ Object
Returns the value of attribute contents.
-
#hash ⇒ Object
Returns the value of attribute hash.
Instance Method Summary collapse
- #==(bundle) ⇒ Object
- #extension ⇒ Object
-
#initialize(*files) ⇒ CSSBundle
constructor
A new instance of CSSBundle.
Constructor Details
#initialize(*files) ⇒ CSSBundle
Returns a new instance of CSSBundle.
5 6 7 8 |
# File 'lib/rack/bundle/css_bundle.rb', line 5 def initialize *files @contents = files.join "\n" @hash = MD5.new(@contents).to_s end |
Instance Attribute Details
#contents ⇒ Object
Returns the value of attribute contents.
4 5 6 |
# File 'lib/rack/bundle/css_bundle.rb', line 4 def contents @contents end |
#hash ⇒ Object
Returns the value of attribute hash.
4 5 6 |
# File 'lib/rack/bundle/css_bundle.rb', line 4 def hash @hash end |
Instance Method Details
#==(bundle) ⇒ Object
14 15 16 |
# File 'lib/rack/bundle/css_bundle.rb', line 14 def == bundle self.class == bundle.class && hash == bundle.hash end |
#extension ⇒ Object
10 11 12 |
# File 'lib/rack/bundle/css_bundle.rb', line 10 def extension 'css' end |