class Udongo::Breadcrumb
Public Class Methods
new()
click to toggle source
# File lib/udongo/breadcrumb.rb, line 3 def initialize @items = [] end
Public Instance Methods
add(name, link = nil)
click to toggle source
# File lib/udongo/breadcrumb.rb, line 11 def add(name, link = nil) @items << { name: name, link: link } end
all()
click to toggle source
# File lib/udongo/breadcrumb.rb, line 7 def all @items end
any?()
click to toggle source
# File lib/udongo/breadcrumb.rb, line 15 def any? @items.any? end
each() { |i| ... }
click to toggle source
# File lib/udongo/breadcrumb.rb, line 19 def each raise 'Block expected' unless block_given? if block_given? @items.each { |i| yield(i) } end end