Class: VantivLite::Config::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/vantiv_lite/config.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBuilder

Returns a new instance of Builder.



23
24
25
# File 'lib/vantiv_lite/config.rb', line 23

def initialize
  @opts = {}
end

Class Method Details

.call(&blk) ⇒ Object



19
20
21
# File 'lib/vantiv_lite/config.rb', line 19

def self.call(&blk)
  new.(&blk)
end

Instance Method Details

#call(&blk) ⇒ Object



29
30
31
32
# File 'lib/vantiv_lite/config.rb', line 29

def call(&blk)
  instance_eval(&blk) if block_given?
  Config.new(@opts)
end