Class: LiquidAssets::Template
- Inherits:
-
Object
- Object
- LiquidAssets::Template
- Defined in:
- lib/liquid_assets/template.rb
Instance Attribute Summary collapse
-
#mtime ⇒ Object
readonly
Returns the value of attribute mtime.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(source, mtime = Time.now) ⇒ Template
constructor
A new instance of Template.
- #present? ⇒ Boolean
Constructor Details
#initialize(source, mtime = Time.now) ⇒ Template
Returns a new instance of Template.
7 8 9 10 |
# File 'lib/liquid_assets/template.rb', line 7 def initialize( source, mtime=Time.now ) @source = source @mtime = mtime end |
Instance Attribute Details
#mtime ⇒ Object (readonly)
Returns the value of attribute mtime.
5 6 7 |
# File 'lib/liquid_assets/template.rb', line 5 def mtime @mtime end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
5 6 7 |
# File 'lib/liquid_assets/template.rb', line 5 def source @source end |
Instance Method Details
#present? ⇒ Boolean
12 13 14 |
# File 'lib/liquid_assets/template.rb', line 12 def present? ! @source.nil? && ! @source.empty? end |