Class: Petra::Proxies::Handlers::MissingMethodHandler
- Inherits:
-
Object
- Object
- Petra::Proxies::Handlers::MissingMethodHandler
- Defined in:
- lib/petra/proxies/handlers/missing_method_handler.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#proxy ⇒ Object
readonly
Returns the value of attribute proxy.
Class Method Summary collapse
-
.add_constraint(position, other_handler) ⇒ Object
Adds a constraint to this handler class regarding the position it will end up in when actually executing the handlers.
- .constraints ⇒ Object
Instance Method Summary collapse
- #applicable? ⇒ Boolean
- #handle ⇒ Object
-
#initialize(proxy) ⇒ MissingMethodHandler
constructor
A new instance of MissingMethodHandler.
- #queue_constraints ⇒ Object
Constructor Details
#initialize(proxy) ⇒ MissingMethodHandler
Returns a new instance of MissingMethodHandler.
7 8 9 |
# File 'lib/petra/proxies/handlers/missing_method_handler.rb', line 7 def initialize(proxy) @proxy = proxy end |
Instance Attribute Details
#proxy ⇒ Object (readonly)
Returns the value of attribute proxy.
11 12 13 |
# File 'lib/petra/proxies/handlers/missing_method_handler.rb', line 11 def proxy @proxy end |
Class Method Details
.add_constraint(position, other_handler) ⇒ Object
Adds a constraint to this handler class regarding the position it will end up in when actually executing the handlers.
27 28 29 30 |
# File 'lib/petra/proxies/handlers/missing_method_handler.rb', line 27 def add_constraint(position, other_handler) method = position.to_sym == :before ? :< : :> constraints << [method, other_handler.to_sym] end |
.constraints ⇒ Object
15 16 17 |
# File 'lib/petra/proxies/handlers/missing_method_handler.rb', line 15 def constraints @constraints ||= [] end |
Instance Method Details
#applicable? ⇒ Boolean
37 38 39 |
# File 'lib/petra/proxies/handlers/missing_method_handler.rb', line 37 def applicable? not_implemented end |
#handle ⇒ Object
41 42 43 |
# File 'lib/petra/proxies/handlers/missing_method_handler.rb', line 41 def handle(*) not_implemented end |
#queue_constraints ⇒ Object
33 34 35 |
# File 'lib/petra/proxies/handlers/missing_method_handler.rb', line 33 def queue_constraints not_implemented end |