Sha256: c3834cc2ef1a442884d1cc0e68e4f92893fd1d6867b606c3d16cd40d0b97688e

Contents?: true

Size: 435 Bytes

Versions: 1

Compression:

Stored size: 435 Bytes

Contents

module RailsCrumbs
  class Crumb
    attr_accessor :name
    attr_accessor :path
    attr_accessor :options

    def initialize(name, path = nil, options = {})
      self.name     = name
      self.path     = path
      self.options  = options
    end

    private

    def method_missing(name, *args)
      if options.has_key? name.to_sym
        options[name.to_sym]
      else
        super(name, *args)
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails_crumbs-1.0.0 lib/rails_crumbs/crumbs.rb