| Class | Magnolia::Mark |
| In: |
lib/magnolia/magnolia.rb
|
| Parent: | Object |
The mark class is used to store information about each bookmark after it is found, created or updated. Each method that is not in the DONT_PROCESS constant returns and array of Mark objects.
| a_tag | [R] | |
| created | [RW] | |
| description | [RW] | |
| id | [RW] | |
| img_tag | [R] | |
| owner | [RW] | |
| private | [RW] | |
| rating | [RW] | |
| screenshot | [RW] | |
| tags | [RW] | |
| title | [RW] | |
| updated | [RW] | |
| url | [RW] |
This method allows working with bookmarks much like ActiveRecord.
mark = Magnolia::Mark.new mark.title = 'Addicted To New' mark.url = 'http://addictedtonew.com/' mark.tags = ['john nunemaker', 'me'] # you can also use comma-seperated list mark.tags = 'john nunemaker, me' mark.save puts mark.id # this is the id of the newly created bookmark
You can also use it to update bookmarks like so:
mark = Magnolia::Mark.find(:id => 'someshortname') mark.title = 'Addicted To New by John Nunemaker' mark.save