Method: KRPC::Streaming::StreamConstructors#method_missing
- Defined in:
- lib/krpc/streaming.rb
#method_missing(method, *args, **kwargs, &block) ⇒ Object
153 154 155 156 157 158 159 160 161 |
# File 'lib/krpc/streaming.rb', line 153 def method_missing(method, *args, **kwargs, &block) if STREAM_METHOD_REGEX =~ method.to_s if respond_to? $1.to_sym ctors = self.is_a?(Module) ? stream_constructors : self.class.stream_constructors return ctors[$1].call(self, *args, **kwargs) if ctors.include? $1 end end super end |