class Caracal::Core::Models::BookmarkModel

This class encapsulates the logic needed to store and manipulate bookmarks.

Attributes

bookmark_id[R]
bookmark_name[R]
bookmark_start[R]

accessors

Public Instance Methods

run_attributes() click to toggle source

.run_attributes

# File lib/caracal/core/models/bookmark_model.rb, line 30
def run_attributes
  {
    start:          bookmark_start,
    id:             bookmark_id,
    name:           bookmark_name
  }
end
start?() click to toggle source
STATE HELPERS =========================
# File lib/caracal/core/models/bookmark_model.rb, line 57
def start?
  !!bookmark_start
end
valid?() click to toggle source
VALIDATION ============================
# File lib/caracal/core/models/bookmark_model.rb, line 64
def valid?
  start? ? !bookmark_name.to_s.strip.empty? : true
end

Private Instance Methods

option_keys() click to toggle source
# File lib/caracal/core/models/bookmark_model.rb, line 74
def option_keys
  [:name, :start]
end