Class: Rose::Attribute::Filter

Inherits:
Indirect show all
Defined in:
lib/rose/attribute.rb

Overview

This class defines an Indirect Attribute for rejecting table rows

Instance Attribute Summary

Attributes inherited from Indirect

#value_block

Attributes inherited from Rose::Attribute

#column_name, #method_name

Instance Method Summary collapse

Methods inherited from Indirect

#evaluate, #initialize

Methods inherited from Rose::Attribute

#initialize

Constructor Details

This class inherits a constructor from Rose::Attribute::Indirect

Instance Method Details

#on(table) ⇒ Object



87
88
89
90
# File 'lib/rose/attribute.rb', line 87

def on(table)
  table.data.reject! { |record| !@value_block.call(record) }
  table
end