Module: Yogo::Operation::Closed::Call

Defined in:
lib/yogo/operation/closed/call.rb

Instance Method Summary collapse

Instance Method Details

#call(*args) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/yogo/operation/closed/call.rb', line 7

def call(*args)
  argument = args.first
  result = super(*args)
  unless result.kind_of?(argument.class)
    raise(OperationNotClosedError, :argument => argument, :result => result)
  end
  result
end