Class: InterfaceSingleOut
- Includes:
- Interface
- Defined in:
- lib/white_gold/abi/interface/interface_single_out.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call(host, name, *a) ⇒ Object
-
#initialize(packer, unpacker) ⇒ InterfaceSingleOut
constructor
A new instance of InterfaceSingleOut.
Methods included from Interface
abi_const_string_method_suffix, fiddle_type, packer_fiddle_type, parse_packer, parse_unpacker
Constructor Details
#initialize(packer, unpacker) ⇒ InterfaceSingleOut
Returns a new instance of InterfaceSingleOut.
8 9 10 11 |
# File 'lib/white_gold/abi/interface/interface_single_out.rb', line 8 def initialize packer, unpacker @packer = packer @unpacker = unpacker end |
Class Method Details
.from(packer, unpacker) ⇒ Object
4 5 6 |
# File 'lib/white_gold/abi/interface/interface_single_out.rb', line 4 def self.from packer, unpacker self.new Interface.parse_packer(packer), Interface.parse_unpacker(unpacker) end |
Instance Method Details
#call(host, name, *a) ⇒ Object
13 14 15 16 17 |
# File 'lib/white_gold/abi/interface/interface_single_out.rb', line 13 def call host, name, *a a = @packer.call host, *a if @packer received = host.send name, *a @unpacker&.call host, received end |