lib/coactive/lookups/object.rb in coactive-0.3.0 vs lib/coactive/lookups/object.rb in coactive-0.4.0

- old
+ new

@@ -12,26 +12,26 @@ def lookup(coactant) return if terminate?(coactant) if coactant.name.present? && (coactor = resolve(coactant)) coactor - elsif @klass.coactive_config.lookup_superclass_for_object && coactant.superclass + elsif @config.lookup_superclass_for_object && coactant.superclass lookup(coactant.superclass) end end def terminate?(coactant) - coactant.name.to_s.in?(@klass.coactive_config.lookup_superclass_until) + coactant.name.to_s.in?(@config.lookup_superclass_until) end def resolve(coactant) name = resolve_name(coactant) coactor = name.safe_constantize return coactor if coactor && name == coactor.name end def resolve_name(coactant) - suffix = @klass.coactive_config.class_suffix + suffix = @config.class_suffix namespace = @klass.name.to_s.sub(/#{suffix}$/, '').to_s [namespace, "#{coactant.name}#{suffix}"].join('::') end class << self