Class: DocuSign::Builder::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/docu_sign/builder/base.rb

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args, &block) ⇒ Base

Returns a new instance of Base.



10
# File 'lib/docu_sign/builder/base.rb', line 10

def initialize(*args, &block); end

Class Attribute Details

.builder_classObject

Returns the value of attribute builder_class.



5
6
7
# File 'lib/docu_sign/builder/base.rb', line 5

def builder_class
  @builder_class
end

Instance Attribute Details

#objectObject

Returns the value of attribute object.



8
9
10
# File 'lib/docu_sign/builder/base.rb', line 8

def object
  @object
end

Instance Method Details

#build(options = {}, &block) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/docu_sign/builder/base.rb', line 12

def build(options = {}, &block)
  (self.object = builder_class.new).tap do |o|
    options.each do |key, value|
      o.send "#{key}=", value
    end

    yield o if block_given?
  end
end

#builder_classObject



22
23
24
# File 'lib/docu_sign/builder/base.rb', line 22

def builder_class
  self.class.builder_class
end