Class: Assently::Case

Inherits:
Object
  • Object
show all
Defined in:
lib/assently/case.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, signature_types, id: nil) ⇒ Case

Returns a new instance of Case.



11
12
13
14
15
# File 'lib/assently/case.rb', line 11

def initialize name, signature_types, id: nil
  @name = name
  @id = id || IdGenerator.generate
  self.signature_types = signature_types
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



9
10
11
# File 'lib/assently/case.rb', line 9

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/assently/case.rb', line 9

def name
  @name
end

#signature_typesObject

Returns the value of attribute signature_types.



9
10
11
# File 'lib/assently/case.rb', line 9

def signature_types
  @signature_types
end

Class Method Details

.signature_typesObject



5
6
7
# File 'lib/assently/case.rb', line 5

def self.signature_types
  [ "sms", "electronicid", "touch", "quickintent", "signbyhand" ]
end

Instance Method Details

#add_document(document) ⇒ Object



36
37
38
# File 'lib/assently/case.rb', line 36

def add_document document
  self.documents << document
end

#add_party(party) ⇒ Object



28
29
30
# File 'lib/assently/case.rb', line 28

def add_party party
  self.parties << party
end

#documentsObject



40
41
42
# File 'lib/assently/case.rb', line 40

def documents
  @documents ||= []
end

#partiesObject



32
33
34
# File 'lib/assently/case.rb', line 32

def parties
  @parties ||= []
end