Class: Flutie::BodyClass
- Inherits:
-
Object
- Object
- Flutie::BodyClass
- Defined in:
- lib/flutie/body_class.rb
Overview
:nodoc:
Constant Summary collapse
- DEFAULT_EXTRA_CLASS_SYMBOL =
:extra_body_classes
Instance Attribute Summary collapse
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #basic_body_class ⇒ Object
- #extra_body_classes_symbol ⇒ Object
-
#initialize(options, controller) ⇒ BodyClass
constructor
A new instance of BodyClass.
Constructor Details
#initialize(options, controller) ⇒ BodyClass
Returns a new instance of BodyClass.
8 9 10 11 |
# File 'lib/flutie/body_class.rb', line 8 def initialize(, controller) = @controller = controller end |
Instance Attribute Details
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
6 7 8 |
# File 'lib/flutie/body_class.rb', line 6 def controller @controller end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/flutie/body_class.rb', line 6 def end |
Instance Method Details
#basic_body_class ⇒ Object
13 14 15 |
# File 'lib/flutie/body_class.rb', line 13 def basic_body_class [controller_part, action_part].join(' ') end |
#extra_body_classes_symbol ⇒ Object
17 18 19 |
# File 'lib/flutie/body_class.rb', line 17 def extra_body_classes_symbol [:extra_body_classes_symbol] || DEFAULT_EXTRA_CLASS_SYMBOL end |