class Crumby::Entry

represent an entry of a breadcrumb menu

Public Instance Methods

first?() click to toggle source

Returns if first entry @return [Boolean]

# File lib/crumby/entry.rb, line 15
def first?
  position.zero?
end
last?() click to toggle source

Returns if last entry @return [Boolean]

# File lib/crumby/entry.rb, line 21
def last?
  (total - position - 1).zero?
end
total() click to toggle source

Returns total entries @return [Fixnum]

# File lib/crumby/entry.rb, line 9
def total
  trail.count
end