Class: CSVPlusPlus::Modifier::ConditionalFormatting
- Inherits:
-
Object
- Object
- CSVPlusPlus::Modifier::ConditionalFormatting
- Defined in:
- lib/csv_plus_plus/modifier/conditional_formatting.rb
Overview
A class that handles the rules for modifiers to support conditional formatting.
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#condition ⇒ Object
readonly
Returns the value of attribute condition.
-
#invalid_reason ⇒ Object
readonly
Returns the value of attribute invalid_reason.
Instance Method Summary collapse
-
#initialize(value) ⇒ ConditionalFormatting
constructor
A new instance of ConditionalFormatting.
Constructor Details
#initialize(value) ⇒ ConditionalFormatting
Returns a new instance of ConditionalFormatting.
11 12 13 14 15 |
# File 'lib/csv_plus_plus/modifier/conditional_formatting.rb', line 11 def initialize(value) condition, args = value.split(/\si:\s*/) @condition = condition.to_sym @arguments = args.split(/\s+/) end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
8 9 10 |
# File 'lib/csv_plus_plus/modifier/conditional_formatting.rb', line 8 def arguments @arguments end |
#condition ⇒ Object (readonly)
Returns the value of attribute condition.
8 9 10 |
# File 'lib/csv_plus_plus/modifier/conditional_formatting.rb', line 8 def condition @condition end |
#invalid_reason ⇒ Object (readonly)
Returns the value of attribute invalid_reason.
8 9 10 |
# File 'lib/csv_plus_plus/modifier/conditional_formatting.rb', line 8 def invalid_reason @invalid_reason end |