Class: Crumpet::Crumb

Inherits:
Object
  • Object
show all
Defined in:
lib/crumpet/crumb.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, *args) ⇒ Crumb

Returns a new instance of Crumb.



5
6
7
8
9
10
11
# File 'lib/crumpet/crumb.rb', line 5

def initialize(name, *args)
  @options = args.extract_options!
  @item_options = @options.delete(:item_options) || {}
  @wrapper_options = @options.delete(:wrapper_options) || {}
  @name = name
  @url = args.first
end

Instance Attribute Details

#item_optionsObject (readonly)

Returns the value of attribute item_options.



3
4
5
# File 'lib/crumpet/crumb.rb', line 3

def item_options
  @item_options
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/crumpet/crumb.rb', line 3

def name
  @name
end

#optionsObject (readonly)

Returns the value of attribute options.



3
4
5
# File 'lib/crumpet/crumb.rb', line 3

def options
  @options
end

#urlObject (readonly)

Returns the value of attribute url.



3
4
5
# File 'lib/crumpet/crumb.rb', line 3

def url
  @url
end

#wrapper_optionsObject (readonly)

Returns the value of attribute wrapper_options.



3
4
5
# File 'lib/crumpet/crumb.rb', line 3

def wrapper_options
  @wrapper_options
end