Class: LedgerWeb::Decorators::HighlightDecorator

Inherits:
Object
  • Object
show all
Defined in:
lib/ledger_web/decorators.rb

Instance Method Summary collapse

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