Debian Codegraph @

vendor/mruby-source/mrbgems/mruby-method/mrblib/method.rb

raw
1 class Method
2 def to_proc
3 m = self
4 lambda { |*args, **opts, &b|
5 m.call(*args, **opts, &b)
6 }
7 end
8
9 def <<(other)
10 ->(*args, **opts, &block) { call(other.call(*args, **opts, &block)) }
11 end
12
13 def >>(other)
14 ->(*args, **opts, &block) { other.call(call(*args, **opts, &block)) }
15 end
16 end