A Seep file that instantiates a class, and code to acquire the object from Seep.
The class to instantiate, simpleobject.rb:
class SimpleObject
def hello_world
puts "Hello, world!"
end
end
The seep file, seep.xml:
<objects> <object id="simple_object" class="SimpleObject"/> </objects>
Code that talks to Seep, driver.rb:
require 'seep/context_factory'
factory = Seep::ContextFactory.new
context = factory.get_context('seep.xml')
obj = context.get("simple_object")
obj.hello_world