Module: Kernel
- Defined in:
- lib/sketches/extensions/kernel.rb
Instance Method Summary collapse
-
#name_sketch(id, name) ⇒ Object
Names the sketch with the specified id with the specified name.
-
#save_sketch(id_or_name, path) ⇒ Object
Saves the sketch with the specified id_or_name to the specified path.
-
#sketch(id_or_name = nil) ⇒ Object
Edits the sketch with the specified id_or_name.
-
#sketch_from(path) ⇒ Object
Creates a new sketch using the specified path.
-
#sketches ⇒ Object
Print out all of the sketches.
Instance Method Details
#name_sketch(id, name) ⇒ Object
Names the sketch with the specified id with the specified name.
name_sketch 2, :foo
52 53 54 |
# File 'lib/sketches/extensions/kernel.rb', line 52 def name_sketch(id,name) Sketches.name(id,name) end |
#save_sketch(id_or_name, path) ⇒ Object
Saves the sketch with the specified id_or_name to the specified path.
save_sketch 2, 'path/to/example.rb'
save_sketch :foo, 'path/to/foo.rb'
64 65 66 |
# File 'lib/sketches/extensions/kernel.rb', line 64 def save_sketch(id_or_name,path) Sketches.save(id_or_name,path) end |
#sketch(id_or_name = nil) ⇒ Object
Edits the sketch with the specified id_or_name. If no sketch exists with the specified id_or_name, one will be created.
sketch 2
sketch :foo
34 35 36 |
# File 'lib/sketches/extensions/kernel.rb', line 34 def sketch(id_or_name=nil) Sketches.sketch(id_or_name) end |