Class: Bparity::Adapter::External

Inherits:
Object
  • Object
show all
Defined in:
lib/bparity/adapter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source, target) ⇒ External

Returns a new instance of External.



63
64
65
66
67
# File 'lib/bparity/adapter.rb', line 63

def initialize(source, target)
  @source = source
  @target = target
  @call_mappers = {}
end

Instance Attribute Details

#call_mappersObject (readonly)

Returns the value of attribute call_mappers.



61
62
63
# File 'lib/bparity/adapter.rb', line 61

def call_mappers
  @call_mappers
end

#sourceObject (readonly)

Returns the value of attribute source.



61
62
63
# File 'lib/bparity/adapter.rb', line 61

def source
  @source
end

#targetObject (readonly)

Returns the value of attribute target.



61
62
63
# File 'lib/bparity/adapter.rb', line 61

def target
  @target
end

Instance Method Details

#map_call(name, &block) ⇒ Object



69
70
71
# File 'lib/bparity/adapter.rb', line 69

def map_call(name, &block)
  call_mappers[name.to_s] = block
end