lib/activefacts/cql/require.rb in activefacts-cql-1.8.1 vs lib/activefacts/cql/require.rb in activefacts-cql-1.8.2
- old
+ new
@@ -17,18 +17,18 @@
# to Ruby code and eval'd, making the generated classes available.
# To make this Loader available, simply
# require 'activefacts/cql'
class CQLLoader
def self.load(file) #:nodoc:
- trace "Loading #{file}" do
- vocabulary = ActiveFacts::Input::CQL.readfile(file)
+ trace "Loading #{file}" do
+ vocabulary = ActiveFacts::Input::CQL.readfile(file)
- ruby = StringIO.new
- @dumper = ActiveFacts::Generators::RUBY.new(vocabulary.constellation)
- @dumper.generate(ruby)
- ruby.rewind
- eval ruby.read, ::TOPLEVEL_BINDING
- end
+ ruby = StringIO.new
+ @dumper = ActiveFacts::Generators::RUBY.new(vocabulary.constellation)
+ @dumper.generate(ruby)
+ ruby.rewind
+ eval ruby.read, ::TOPLEVEL_BINDING
+ end
end
end
Polyglot.register('cql', CQLLoader)
end