Class: Google::Apis::SheetsV4::ConditionalFormatRule

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/sheets_v4/classes.rb,
generated/google/apis/sheets_v4/representations.rb,
generated/google/apis/sheets_v4/representations.rb

Overview

A rule describing a conditional format.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ConditionalFormatRule

Returns a new instance of ConditionalFormatRule.



1643
1644
1645
# File 'generated/google/apis/sheets_v4/classes.rb', line 1643

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#boolean_ruleGoogle::Apis::SheetsV4::BooleanRule

A rule that may or may not match, depending on the condition. Corresponds to the JSON property booleanRule



1635
1636
1637
# File 'generated/google/apis/sheets_v4/classes.rb', line 1635

def boolean_rule
  @boolean_rule
end

#gradient_ruleGoogle::Apis::SheetsV4::GradientRule

A rule that applies a gradient color scale format, based on the interpolation points listed. The format of a cell will vary based on its contents as compared to the values of the interpolation points. Corresponds to the JSON property gradientRule



1630
1631
1632
# File 'generated/google/apis/sheets_v4/classes.rb', line 1630

def gradient_rule
  @gradient_rule
end

#rangesArray<Google::Apis::SheetsV4::GridRange>

The ranges that will be formatted if the condition is true. All the ranges must be on the same grid. Corresponds to the JSON property ranges



1641
1642
1643
# File 'generated/google/apis/sheets_v4/classes.rb', line 1641

def ranges
  @ranges
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1648
1649
1650
1651
1652
# File 'generated/google/apis/sheets_v4/classes.rb', line 1648

def update!(**args)
  @gradient_rule = args[:gradient_rule] if args.key?(:gradient_rule)
  @boolean_rule = args[:boolean_rule] if args.key?(:boolean_rule)
  @ranges = args[:ranges] if args.key?(:ranges)
end