Class: DocuSign::Builder::Base
- Inherits:
-
Object
- Object
- DocuSign::Builder::Base
- Defined in:
- lib/docu_sign/builder/base.rb
Direct Known Subclasses
AnchorBuilder, DocumentBuilder, NotificationBuilder, RecipientBuilder, TabBuilder
Class Attribute Summary collapse
-
.builder_class ⇒ Object
Returns the value of attribute builder_class.
Instance Attribute Summary collapse
-
#object ⇒ Object
Returns the value of attribute object.
Instance Method Summary collapse
- #build(options = {}, &block) ⇒ Object
- #builder_class ⇒ Object
-
#initialize(*args, &block) ⇒ Base
constructor
A new instance of Base.
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_class ⇒ Object
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
#object ⇒ Object
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( = {}, &block) (self.object = builder_class.new).tap do |o| .each do |key, value| o.send "#{key}=", value end yield o if block_given? end end |
#builder_class ⇒ Object
22 23 24 |
# File 'lib/docu_sign/builder/base.rb', line 22 def builder_class self.class.builder_class end |