Class: LedgerWeb::Decorators::HighlightDecorator
- Inherits:
-
Object
- Object
- LedgerWeb::Decorators::HighlightDecorator
- Defined in:
- lib/ledger_web/decorators.rb
Instance Method Summary collapse
- #decorate(cell, row) ⇒ Object
-
#initialize(color) ⇒ HighlightDecorator
constructor
A new instance of HighlightDecorator.
Constructor Details
#initialize(color) ⇒ HighlightDecorator
Returns a new instance of HighlightDecorator.
49 50 51 |
# File 'lib/ledger_web/decorators.rb', line 49 def initialize(color) @color = color end |
Instance Method Details
#decorate(cell, row) ⇒ Object
53 54 55 56 |
# File 'lib/ledger_web/decorators.rb', line 53 def decorate(cell, row) cell.style['background-color'] = @color cell end |