Class: Assently::Case
- Inherits:
-
Object
- Object
- Assently::Case
- Defined in:
- lib/assently/case.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#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, id: nil) ⇒ Case
constructor
A new instance of Case.
- #parties ⇒ Object
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
#id ⇒ Object (readonly)
Returns the value of attribute id.
9 10 11 |
# File 'lib/assently/case.rb', line 9 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/assently/case.rb', line 9 def name @name end |
#signature_types ⇒ Object
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_types ⇒ Object
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 |
#documents ⇒ Object
40 41 42 |
# File 'lib/assently/case.rb', line 40 def documents @documents ||= [] end |
#parties ⇒ Object
32 33 34 |
# File 'lib/assently/case.rb', line 32 def parties @parties ||= [] end |