Module: Surrounded::Context::NameCollisionDetector
- Defined in:
- lib/surrounded/context/name_collision_detector.rb
Defined Under Namespace
Modules: NameCollisionHandler
Instance Attribute Summary collapse
-
#handler ⇒ Object
readonly
Returns the value of attribute handler.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#handler ⇒ Object (readonly)
Returns the value of attribute handler.
6 7 8 |
# File 'lib/surrounded/context/name_collision_detector.rb', line 6 def handler @handler end |
Class Method Details
.extended(base) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/surrounded/context/name_collision_detector.rb', line 8 def self.extended(base) base.send :include, NameCollisionHandler unless defined?(base::NameCollisionError) base.const_set(:NameCollinionError, Class.new(::Surrounded::Context::NameCollisionError)) end end |
Instance Method Details
#on_name_collision(method_name) ⇒ Object
15 16 17 |
# File 'lib/surrounded/context/name_collision_detector.rb', line 15 def on_name_collision(method_name) @handler = method_name end |