Class: Egree::Case
- Inherits:
-
Object
- Object
- Egree::Case
- Defined in:
- lib/egree/case.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
- #reference_id ⇒ Object
-
#signature_types ⇒ Object
Returns the value of attribute signature_types.
Class Method Summary collapse
Instance Method Summary collapse
- #add_document(document) ⇒ Object
- #add_party(party) ⇒ Object
- #documents ⇒ Object
-
#initialize(name, signature_types) ⇒ Case
constructor
A new instance of Case.
- #parties ⇒ Object
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
13 14 15 |
# File 'lib/egree/case.rb', line 13 def name @name end |
#reference_id ⇒ Object
22 23 24 |
# File 'lib/egree/case.rb', line 22 def reference_id @reference_id ||= self.class.generate_reference_id end |
#signature_types ⇒ Object
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_id ⇒ Object
9 10 11 |
# File 'lib/egree/case.rb', line 9 def self.generate_reference_id ReferenceId.generate end |
.signature_types ⇒ Object
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 |
#documents ⇒ Object
49 50 51 |
# File 'lib/egree/case.rb', line 49 def documents @documents ||= [] end |
#parties ⇒ Object
41 42 43 |
# File 'lib/egree/case.rb', line 41 def parties @parties ||= [] end |