Class: TableWarnings::Arbitrary
- Inherits:
-
Object
- Object
- TableWarnings::Arbitrary
- Defined in:
- lib/table_warnings/arbitrary.rb
Instance Attribute Summary collapse
-
#blk ⇒ Object
readonly
Returns the value of attribute blk.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
Instance Method Summary collapse
-
#initialize(table, blk) ⇒ Arbitrary
constructor
A new instance of Arbitrary.
- #messages ⇒ Object
Constructor Details
#initialize(table, blk) ⇒ Arbitrary
Returns a new instance of Arbitrary.
6 7 8 9 |
# File 'lib/table_warnings/arbitrary.rb', line 6 def initialize(table, blk) @table = table @blk = blk end |
Instance Attribute Details
#blk ⇒ Object (readonly)
Returns the value of attribute blk.
4 5 6 |
# File 'lib/table_warnings/arbitrary.rb', line 4 def blk @blk end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
3 4 5 |
# File 'lib/table_warnings/arbitrary.rb', line 3 def table @table end |
Instance Method Details
#messages ⇒ Object
11 12 13 14 15 |
# File 'lib/table_warnings/arbitrary.rb', line 11 def if = table.instance_eval(&blk) [].flatten.select { || .present? } end end |