Class: Egree::Case

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, signature_types) ⇒ Case

Returns a new instance of Case.



15
16
17
18
# File 'lib/egree/case.rb', line 15

def initialize name, signature_types
  @name = name
  self.signature_types = signature_types
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



13
14
15
# File 'lib/egree/case.rb', line 13

def name
  @name
end

#reference_idObject



22
23
24
# File 'lib/egree/case.rb', line 22

def reference_id
  @reference_id ||= self.class.generate_reference_id
end

#signature_typesObject

Returns the value of attribute signature_types.



13
14
15
# File 'lib/egree/case.rb', line 13

def signature_types
  @signature_types
end

Class Method Details

.generate_reference_idObject



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

def self.generate_reference_id
  ReferenceId.generate
end

.signature_typesObject



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

def self.signature_types
  [ "sms", "electronicId", "touch" ]
end

Instance Method Details

#add_document(document) ⇒ Object



45
46
47
# File 'lib/egree/case.rb', line 45

def add_document document
  self.documents << document
end

#add_party(party) ⇒ Object



37
38
39
# File 'lib/egree/case.rb', line 37

def add_party party
  self.parties << party
end

#documentsObject



49
50
51
# File 'lib/egree/case.rb', line 49

def documents
  @documents ||= []
end

#partiesObject



41
42
43
# File 'lib/egree/case.rb', line 41

def parties
  @parties ||= []
end