Sha256: 15dfd254d93b801ae2541a46b86a5cc21c857500e10276ff6e5abde8425dac14
Contents?: true
Size: 1.08 KB
Versions: 1
Compression:
Stored size: 1.08 KB
Contents
# ObjectLoader * [Source](http://github.com/postmodern/object_loader) * [Issues](http://github.com/postmodern/object_loader/issues) * [Documentation](http://rubydoc.info/gems/object_loader) * [Email](mailto:postmodern.mod3 at gmail.com) ## Description ObjectLoader can load Ruby Objects containing methods and procs from Ruby files without having to use YAML or define classes named like the file. ## Examples # file: controller.rb class Controller include ObjectLoader # ... end # file: my_controller.rb Controller.object do def test1 'This is the first test' end def test2(mesg) "Hello #{mesg}" end end # load a Controller object from a file. controller = Controller.load_object('my_controller.rb') # => #<Controller: ...> controller.test1 # => "This is the first test" controller.test2('one two three') # => "Hello one two three" ## Install $ sudo gem install object_loader ## Copyright Copyright (c) 2011 Hal Brodigan See {file:LICENSE.txt} for license information.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
object_loader-1.0.0 | README.md |