Class: DocuSign::DocuSignModel

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

Constant Summary collapse

ATTRIBUTES =
[]

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ DocuSignModel

Returns a new instance of DocuSignModel.



5
6
7
8
9
# File 'lib/docu_sign/docu_sign_model.rb', line 5

def initialize(attributes = {})
  ATTRIBUTES.each do |attr|
    self.send("#{attr}=", attributes[attr])
  end
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/docu_sign/docu_sign_model.rb', line 15

def method_missing(method, *args, &block)
  if method =~ /(.+)\?$/
    self.send($1).nil? ? nil : (self.send($1) == true ? "true" : "false")
  else
    super
  end
end

Instance Method Details

#to_savonObject



11
12
13
# File 'lib/docu_sign/docu_sign_model.rb', line 11

def to_savon
  {}
end