Class: Spider::CompiledTemplate
- Defined in:
- lib/spiderfw/templates/template.rb
Overview
Class holding compiled template code.
Instance Attribute Summary collapse
-
#assets ⇒ Object
Returns the value of attribute assets.
-
#block ⇒ Object
Returns the value of attribute block.
-
#cache_path ⇒ Object
Returns the value of attribute cache_path.
-
#devel_info ⇒ Object
Returns the value of attribute devel_info.
-
#source_path ⇒ Object
Returns the value of attribute source_path.
-
#subtemplates ⇒ Object
Returns the value of attribute subtemplates.
Instance Method Summary collapse
- #collect_mtimes ⇒ Object
- #init_code ⇒ Object
-
#initialize ⇒ CompiledTemplate
constructor
A new instance of CompiledTemplate.
- #run_code ⇒ Object
Constructor Details
#initialize ⇒ CompiledTemplate
Returns a new instance of CompiledTemplate.
992 993 994 995 996 |
# File 'lib/spiderfw/templates/template.rb', line 992 def initialize() @subtemplates = {} @subtemplate_owners = {} @devel_info = {} end |
Instance Attribute Details
#assets ⇒ Object
Returns the value of attribute assets.
989 990 991 |
# File 'lib/spiderfw/templates/template.rb', line 989 def assets @assets end |
#block ⇒ Object
Returns the value of attribute block.
989 990 991 |
# File 'lib/spiderfw/templates/template.rb', line 989 def block @block end |
#cache_path ⇒ Object
Returns the value of attribute cache_path.
989 990 991 |
# File 'lib/spiderfw/templates/template.rb', line 989 def cache_path @cache_path end |
#devel_info ⇒ Object
Returns the value of attribute devel_info.
989 990 991 |
# File 'lib/spiderfw/templates/template.rb', line 989 def devel_info @devel_info end |
#source_path ⇒ Object
Returns the value of attribute source_path.
989 990 991 |
# File 'lib/spiderfw/templates/template.rb', line 989 def source_path @source_path end |
#subtemplates ⇒ Object
Returns the value of attribute subtemplates.
989 990 991 |
# File 'lib/spiderfw/templates/template.rb', line 989 def subtemplates @subtemplates end |
Instance Method Details
#collect_mtimes ⇒ Object
1006 1007 1008 1009 1010 |
# File 'lib/spiderfw/templates/template.rb', line 1006 def collect_mtimes mtimes = {@source_path => File.mtime(@source_path)} @subtemplates.each{ |id, sub| mtimes.merge(sub.collect_mtimes)} return mtimes end |
#init_code ⇒ Object
998 999 1000 |
# File 'lib/spiderfw/templates/template.rb', line 998 def init_code @block.init_code end |
#run_code ⇒ Object
1002 1003 1004 |
# File 'lib/spiderfw/templates/template.rb', line 1002 def run_code @block.run_code end |