class TTY::Table::Operation::Filter
A class responsible for transforming table field
@api private
Public Class Methods
new(filter)
click to toggle source
Initialize a Filter
@api public
# File lib/tty/table/operation/filter.rb, line 13 def initialize(filter) @filter = filter end
Public Instance Methods
call(field, row, col)
click to toggle source
Apply filer to the provided table field
@param [TTY::Table::Field] field
@param [Integer] row
the field row index
@param [Integer] col
the field column index
@api public
# File lib/tty/table/operation/filter.rb, line 28 def call(field, row, col) @filter.call(field.content, row, col) end