Class: Rosemary::Note
- Inherits:
-
Object
- Object
- Rosemary::Note
- Defined in:
- lib/rosemary/note.rb
Overview
The note object
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#id ⇒ Object
Unique ID.
-
#lat ⇒ Object
Returns the value of attribute lat.
-
#lon ⇒ Object
Returns the value of attribute lon.
-
#text ⇒ Object
Returns the value of attribute text.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Note
constructor
A new instance of Note.
Constructor Details
#initialize(attrs = {}) ⇒ Note
Returns a new instance of Note.
14 15 16 17 18 19 20 21 |
# File 'lib/rosemary/note.rb', line 14 def initialize(attrs = {}) attrs.stringify_keys! @lat = attrs['lat'] @lon = attrs['lon'] @text = attrs['text'] || '' @user = attrs['user'] @action = attrs['action'] || '' end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
12 13 14 |
# File 'lib/rosemary/note.rb', line 12 def action @action end |
#id ⇒ Object
Unique ID
6 7 8 |
# File 'lib/rosemary/note.rb', line 6 def id @id end |
#lat ⇒ Object
Returns the value of attribute lat.
8 9 10 |
# File 'lib/rosemary/note.rb', line 8 def lat @lat end |
#lon ⇒ Object
Returns the value of attribute lon.
9 10 11 |
# File 'lib/rosemary/note.rb', line 9 def lon @lon end |
#text ⇒ Object
Returns the value of attribute text.
10 11 12 |
# File 'lib/rosemary/note.rb', line 10 def text @text end |
#user ⇒ Object
Returns the value of attribute user.
11 12 13 |
# File 'lib/rosemary/note.rb', line 11 def user @user end |