Skip to content

Instantly share code, notes, and snippets.

@atimin
Created October 17, 2011 17:35
Show Gist options
  • Save atimin/1293204 to your computer and use it in GitHub Desktop.
Save atimin/1293204 to your computer and use it in GitHub Desktop.
Lipa release-0.2.0
Lipa::Tree["tree://dir_1/dir_2/file_1"].size
#or
tree["dir_1/dir_2/file_1"].size
#or
tree.dir_1.dir_2.file_1.size
kind :planet_system, :for => :node do
num_planet 0
end
kind :planet, :for => :node do
has_live false
has_water false
number 0
end
planet_system :sun_system do
planet :mercury do
number 1
radius 46_001_210
end
planet :venus do
number 2
radius 107_476_259
end
planet :earth do
number 3
radius 147_098_074
has_live true
has_water true
node :moon, :radius => 363_104
end
tree = Lipa::Tree.new :tree do
node :dir_1 do
node :dir_2 do
node :file_1, :size => 100_000
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment