Class: Merrymenu::Tab
- Inherits:
-
Object
- Object
- Merrymenu::Tab
- Defined in:
- lib/merrymenu/builder.rb
Instance Attribute Summary collapse
-
#class_name ⇒ Object
Returns the value of attribute class_name.
-
#exact_match ⇒ Object
Returns the value of attribute exact_match.
-
#name ⇒ Object
Returns the value of attribute name.
-
#roles ⇒ Object
Returns the value of attribute roles.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(name, url, options = {}) ⇒ Tab
constructor
A new instance of Tab.
Constructor Details
#initialize(name, url, options = {}) ⇒ Tab
Returns a new instance of Tab.
58 59 60 61 62 63 64 65 66 |
# File 'lib/merrymenu/builder.rb', line 58 def initialize(name, url, ={}) = .symbolize_keys.reverse_merge!(:roles => nil, :class => '', :exact_match => false) @name = name @url = url @roles = [:roles] classes = [:class].is_a?(Array) ? [:class] : [:class].split(' ') @class_name = (['tab'] + classes).join(' ') @exact_match = [:exact_match] end |
Instance Attribute Details
#class_name ⇒ Object
Returns the value of attribute class_name.
56 57 58 |
# File 'lib/merrymenu/builder.rb', line 56 def class_name @class_name end |
#exact_match ⇒ Object
Returns the value of attribute exact_match.
56 57 58 |
# File 'lib/merrymenu/builder.rb', line 56 def exact_match @exact_match end |
#name ⇒ Object
Returns the value of attribute name.
56 57 58 |
# File 'lib/merrymenu/builder.rb', line 56 def name @name end |
#roles ⇒ Object
Returns the value of attribute roles.
56 57 58 |
# File 'lib/merrymenu/builder.rb', line 56 def roles @roles end |
#url ⇒ Object
Returns the value of attribute url.
56 57 58 |
# File 'lib/merrymenu/builder.rb', line 56 def url @url end |