Class: Hakuban::ObjectExposeContractBuilder
- Inherits:
-
Object
- Object
- Hakuban::ObjectExposeContractBuilder
- Defined in:
- lib/hakuban/exchange.rb
Instance Method Summary collapse
- #build(&block) ⇒ Object
-
#initialize(exchange, descriptor) ⇒ ObjectExposeContractBuilder
constructor
A new instance of ObjectExposeContractBuilder.
- #with_capacity(capacity) ⇒ Object
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 |