Module: Template
- Defined in:
- lib/web_parser/template.rb
Class Method Summary collapse
- .dump_template(template, template_file) ⇒ Object
- .load_template(template_file) ⇒ Object
- .valid?(template_file) ⇒ Boolean
Class Method Details
.dump_template(template, template_file) ⇒ Object
29 30 31 |
# File 'lib/web_parser/template.rb', line 29 def self.dump_template(template,template_file) File.open(template_file,'wb'){|f| f.write YAML.dump(template)} end |
.load_template(template_file) ⇒ Object
25 26 27 |
# File 'lib/web_parser/template.rb', line 25 def self.load_template(template_file) YAML.load_file(template_file) end |
.valid?(template_file) ⇒ Boolean
33 34 35 |
# File 'lib/web_parser/template.rb', line 33 def self.valid?(template_file) # TODO end |