Module: Template

Defined in:
lib/web_parser/template.rb

Class Method Summary collapse

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

Returns:

  • (Boolean)


33
34
35
# File 'lib/web_parser/template.rb', line 33

def self.valid?(template_file)
  # TODO    
end