Sha256: 90516f18b1d7961b46d455f357b53fdcc46430a5e288507a459253dcf8112093

Contents?: true

Size: 634 Bytes

Versions: 7

Compression:

Stored size: 634 Bytes

Contents

module Loaf
  class Builder

    attr_accessor :crumbs

    def initialize(view_context, collection, options = {})

      @params = default_options.merge(options)

      set_breadcrumbs

      build @params
    end

  private

    def set_breadcrumbs(breadcrumbs)
      @params[:breadcrumbs] = breadcrumbs
    end

    def build
      @params.each_pair do |option, value|

      end
    end

    def default_options
      { 
        :breadcrumbs => [],
        :delimiter => " &raquo ",
        :style_class => 'selected',
        :crumb_length => '30',
        :last_crumb_linked => false
      }
    end

  end # Builder
end # Loaf

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
loaf-0.5.0 lib/loaf/builder.rb
loaf-0.4.0 lib/loaf/builder.rb
loaf-0.3.0 lib/loaf/builder.rb
loaf-0.2.1 lib/loaf/builder.rb
loaf-0.2.0 lib/loaf/builder.rb
loaf-0.1.1 lib/loaf/builder.rb
loaf-0.1.0 lib/loaf/builder.rb