Class: LiquidAssets::Template

Inherits:
Object
  • Object
show all
Defined in:
lib/liquid_assets/template.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#mtimeObject (readonly)

Returns the value of attribute mtime.



5
6
7
# File 'lib/liquid_assets/template.rb', line 5

def mtime
  @mtime
end

#sourceObject (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

Returns:

  • (Boolean)


12
13
14
# File 'lib/liquid_assets/template.rb', line 12

def present?
    ! @source.nil? && ! @source.empty?
end