Class: Musa::Series::Constructors::ProxySerie Private
- Defined in:
- lib/musa-dsl/series/proxy-serie.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Proxy/wrapper serie that delegates to another serie.
Acts as transparent proxy forwarding all method calls to the wrapped serie. Useful for lazy evaluation, conditional serie switching, or adding indirection layer.
The proxy can be reassigned to a different serie dynamically by
changing the proxy_source attribute.
Instance Method Summary collapse
-
#initialize(serie) ⇒ ProxySerie
constructor
private
A new instance of ProxySerie.
Constructor Details
#initialize(serie) ⇒ ProxySerie
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ProxySerie.
79 80 81 82 |
# File 'lib/musa-dsl/series/proxy-serie.rb', line 79 def initialize(serie) self.proxy_source = serie init end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, **key_args, &block) ⇒ Object (private)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/musa-dsl/series/proxy-serie.rb', line 92 private def method_missing(method_name, *args, **key_args, &block) if @source if @source.respond_to?(method_name) @source.send method_name, *args, **key_args, &block else raise NoMethodError, "undefined method '#{method_name}' for proxied #{@source.to_s}" end else super end end |