Class: KeytechKit::Note
- Inherits:
-
Object
- Object
- KeytechKit::Note
- Defined in:
- lib/keytechKit/elements/notes/note.rb
Overview
A single note
Instance Attribute Summary collapse
-
#changedAt ⇒ Object
Returns the value of attribute changedAt.
-
#changedBy ⇒ Object
Returns the value of attribute changedBy.
-
#changedByLong ⇒ Object
Returns the value of attribute changedByLong.
-
#createdAt ⇒ Object
Returns the value of attribute createdAt.
-
#createdBy ⇒ Object
Returns the value of attribute createdBy.
-
#createdByLong ⇒ Object
Returns the value of attribute createdByLong.
-
#element_key ⇒ Object
Returns the value of attribute element_key.
-
#id ⇒ Object
Returns the value of attribute id.
-
#note_type ⇒ Object
Returns the value of attribute note_type.
-
#subject ⇒ Object
Returns the value of attribute subject.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(data) ⇒ Note
constructor
A new instance of Note.
- #to_hash ⇒ Object
Constructor Details
#initialize(data) ⇒ Note
Returns a new instance of Note.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/keytechKit/elements/notes/note.rb', line 17 def initialize(data) @changedAt = data['ChangedAt'] @changedBy = data['ChangedBy'] @changedByLong = data['ChangedByLong'] @createdAt = data['CreatedAt'] @createdBy = data['CreatedBy'] @createdByLong = data['CreatedByLong'] @id = data['ID'] || 0 @note_type = data['NoteType'] @subject = data['Subject'] @text = data['Text'] end |
Instance Attribute Details
#changedAt ⇒ Object
Returns the value of attribute changedAt.
5 6 7 |
# File 'lib/keytechKit/elements/notes/note.rb', line 5 def changedAt @changedAt end |
#changedBy ⇒ Object
Returns the value of attribute changedBy.
6 7 8 |
# File 'lib/keytechKit/elements/notes/note.rb', line 6 def changedBy @changedBy end |
#changedByLong ⇒ Object
Returns the value of attribute changedByLong.
7 8 9 |
# File 'lib/keytechKit/elements/notes/note.rb', line 7 def changedByLong @changedByLong end |
#createdAt ⇒ Object
Returns the value of attribute createdAt.
8 9 10 |
# File 'lib/keytechKit/elements/notes/note.rb', line 8 def createdAt @createdAt end |
#createdBy ⇒ Object
Returns the value of attribute createdBy.
9 10 11 |
# File 'lib/keytechKit/elements/notes/note.rb', line 9 def createdBy @createdBy end |
#createdByLong ⇒ Object
Returns the value of attribute createdByLong.
10 11 12 |
# File 'lib/keytechKit/elements/notes/note.rb', line 10 def createdByLong @createdByLong end |
#element_key ⇒ Object
Returns the value of attribute element_key.
15 16 17 |
# File 'lib/keytechKit/elements/notes/note.rb', line 15 def element_key @element_key end |
#id ⇒ Object
Returns the value of attribute id.
11 12 13 |
# File 'lib/keytechKit/elements/notes/note.rb', line 11 def id @id end |
#note_type ⇒ Object
Returns the value of attribute note_type.
12 13 14 |
# File 'lib/keytechKit/elements/notes/note.rb', line 12 def note_type @note_type end |
#subject ⇒ Object
Returns the value of attribute subject.
13 14 15 |
# File 'lib/keytechKit/elements/notes/note.rb', line 13 def subject @subject end |
#text ⇒ Object
Returns the value of attribute text.
14 15 16 |
# File 'lib/keytechKit/elements/notes/note.rb', line 14 def text @text end |
Instance Method Details
#to_hash ⇒ Object
32 33 34 |
# File 'lib/keytechKit/elements/notes/note.rb', line 32 def to_hash { NoteType: @note_type, Subject: @subject, Text: @text } end |