Sha256: 73dcdcb2225dd860d496561d0e7275c607e465f5acee08dae9aef51d5952b697

Contents?: true

Size: 386 Bytes

Versions: 2

Compression:

Stored size: 386 Bytes

Contents

module Bread
  class Crumb < Hash

    def initialize(context, title, path, options)
      @context = context
      options.merge(title: title, path: path).each do |k, v|
        self[k] = v
      end
    end

    def title
      self[:title]
    end

    def path
      self[:path]
    end

    def current?
      @context.current_page? path
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bread-0.0.5 lib/bread/crumb.rb
bread-0.0.4 lib/bread/crumb.rb