Class: TableWarnings::Exclusive
- Inherits:
-
Object
- Object
- TableWarnings::Exclusive
- Defined in:
- lib/table_warnings/exclusive.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#conditions ⇒ Object
readonly
Returns the value of attribute conditions.
-
#scout ⇒ Object
readonly
Returns the value of attribute scout.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
Instance Method Summary collapse
- #covers(columns) ⇒ Object
- #exclusives(columns) ⇒ Object
-
#initialize(table, matcher, options = {}) ⇒ Exclusive
constructor
A new instance of Exclusive.
- #matches(columns) ⇒ Object
- #messages(columns) ⇒ Object
Constructor Details
Instance Attribute Details
#conditions ⇒ Object (readonly)
Returns the value of attribute conditions.
5 6 7 |
# File 'lib/table_warnings/exclusive.rb', line 5 def conditions @conditions end |
#scout ⇒ Object (readonly)
Returns the value of attribute scout.
4 5 6 |
# File 'lib/table_warnings/exclusive.rb', line 4 def scout @scout end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
3 4 5 |
# File 'lib/table_warnings/exclusive.rb', line 3 def table @table end |
Instance Method Details
#covers(columns) ⇒ Object
21 22 23 |
# File 'lib/table_warnings/exclusive.rb', line 21 def covers(columns) columns.select { |column| scout.cover? column } end |
#exclusives(columns) ⇒ Object
13 14 15 |
# File 'lib/table_warnings/exclusive.rb', line 13 def exclusives(columns) columns.select { |column| scout.exclusive? column } end |
#matches(columns) ⇒ Object
17 18 19 |
# File 'lib/table_warnings/exclusive.rb', line 17 def matches(columns) columns.select { |column| scout.match? column } end |
#messages(columns) ⇒ Object
25 26 27 28 29 |
# File 'lib/table_warnings/exclusive.rb', line 25 def (columns) columns.map do |column| column end end |