Created
October 17, 2011 17:35
-
-
Save atimin/1293204 to your computer and use it in GitHub Desktop.
Lipa release-0.2.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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