class ClippingsPluck::Clipping

Public Instance Methods

eligible_for_note_attachment?(note_location) click to toggle source
# File lib/clippings_pluck/clipping.rb, line 11
def eligible_for_note_attachment?(note_location)
  has_location? && normalized_location <= note_location
end
has_location?() click to toggle source
# File lib/clippings_pluck/clipping.rb, line 23
def has_location?
  !missing_location?
end
location=(location) click to toggle source
# File lib/clippings_pluck/clipping.rb, line 3
def location=(location)
  self[:location] = Location.new(location)
end
missing_location?() click to toggle source
# File lib/clippings_pluck/clipping.rb, line 19
def missing_location?
  self[:location].nil?
end
normalized_location() click to toggle source
# File lib/clippings_pluck/clipping.rb, line 7
def normalized_location
  missing_location? ? nil : self[:location].normalize
end
notated?() click to toggle source
# File lib/clippings_pluck/clipping.rb, line 15
def notated?
  !self[:note].nil?
end