Class: RailsCrumbs::Crumb
- Inherits:
-
Object
- Object
- RailsCrumbs::Crumb
- Defined in:
- lib/rails_crumbs/crumbs.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#options ⇒ Object
Returns the value of attribute options.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(name, path = nil, options = {}) ⇒ Crumb
constructor
A new instance of Crumb.
Constructor Details
#initialize(name, path = nil, options = {}) ⇒ Crumb
Returns a new instance of Crumb.
7 8 9 10 11 |
# File 'lib/rails_crumbs/crumbs.rb', line 7 def initialize(name, path = nil, = {}) self.name = name self.path = path self. = end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object (private)
15 16 17 18 19 20 21 |
# File 'lib/rails_crumbs/crumbs.rb', line 15 def method_missing(name, *args) if .has_key? name.to_sym [name.to_sym] else super(name, *args) end end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/rails_crumbs/crumbs.rb', line 3 def name @name end |
#options ⇒ Object
Returns the value of attribute options.
5 6 7 |
# File 'lib/rails_crumbs/crumbs.rb', line 5 def @options end |
#path ⇒ Object
Returns the value of attribute path.
4 5 6 |
# File 'lib/rails_crumbs/crumbs.rb', line 4 def path @path end |