Class: Module
- Inherits:
-
Object
- Object
- Module
- Defined in:
- lib/core_extensions.rb
Overview
Need to modify the inbuilt Module class, to catch const_missing calls.
Instance Method Summary collapse
-
#const_missing_with_freebase_support(class_id) ⇒ Object
New version of const_missing which catches requests made to the Metaweb module/namespace - and generates modules to represent data domains if necessary.
Instance Method Details
#const_missing_with_freebase_support(class_id) ⇒ Object
New version of const_missing which catches requests made to the Metaweb module/namespace - and generates modules to represent data domains if necessary.
7 8 9 10 11 12 13 |
# File 'lib/core_extensions.rb', line 7 def const_missing_with_freebase_support(class_id) if self.name[/^Freebase::Types/] new_freebase_type(class_id) else const_missing_without_freebase_support(class_id) end end |