Class: Hakuban::ObjectExposeContractBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/hakuban/exchange.rb

Instance Method Summary collapse

Constructor Details

#initialize(exchange, descriptor) ⇒ ObjectExposeContractBuilder

Returns a new instance of ObjectExposeContractBuilder.



70
71
72
73
# File 'lib/hakuban/exchange.rb', line 70

def initialize(exchange, descriptor)
  @exchange, @descriptor = exchange, descriptor
  @capacity = 1
end

Instance Method Details

#build(&block) ⇒ Object



80
81
82
# File 'lib/hakuban/exchange.rb', line 80

def build(&block)
  ObjectExposeContract.send(:new, @exchange, @descriptor, @capacity, &block)
end

#with_capacity(capacity) ⇒ Object



75
76
77
78
# File 'lib/hakuban/exchange.rb', line 75

def with_capacity(capacity)
  @capacity = capacity
  self
end