lib/activefacts/api/vocabulary.rb in activefacts-api-0.9.5 vs lib/activefacts/api/vocabulary.rb in activefacts-api-0.9.6
- old
+ new
@@ -30,14 +30,18 @@
camel = name.to_s.camelcase
if (c = @object_type[camel])
__bind(camel)
c
else
- begin
- const_get(camel)
- rescue NameError
- nil
- end
+ if defined?(camel)
+ begin
+ const_get(camel)
+ rescue NameError
+ nil
+ end
+ else
+ nil
+ end
end
end
# Create a new constellation over this vocabulary
def constellation