Sha256: c55b55e5ad825ea3dce4a992796d462fba5e3b5a382dc8d90edbebb4f02d6225
Contents?: true
Size: 500 Bytes
Versions: 6
Compression:
Stored size: 500 Bytes
Contents
# frozen_string_literal: true module Savon class BlockInterface def initialize(target) @target = target end def evaluate(block) if block.arity > 0 block.call(@target) else @original = eval("self", block.binding) instance_eval(&block) end end private def method_missing(method, *args, &block) @target.send(method, *args, &block) rescue NoMethodError @original.send(method, *args, &block) end end end
Version data entries
6 entries across 6 versions & 1 rubygems