Method: Lipa::Tree#load_from

Defined in:
lib/lipa/tree.rb

#load_from(path) ⇒ Object

Load description tree from file

Examples:

Lipa::Tree.new "lipa" do
  load_from File.dirname(__FILE__) + "/data/part_of_tree.rb"
end

Parameters:

  • path

    to file



85
86
87
88
89
# File 'lib/lipa/tree.rb', line 85

def load_from(path)
  File.open(path,'r') do |f|
    instance_eval f.read
  end
end