Class: Google::Apis::DocsV1::NamedRange
- Inherits:
-
Object
- Object
- Google::Apis::DocsV1::NamedRange
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/docs_v1/classes.rb,
lib/google/apis/docs_v1/representations.rb,
lib/google/apis/docs_v1/representations.rb
Overview
A collection of Ranges with the same named range ID. Named ranges allow developers to associate parts of a document with an arbitrary user-defined label so their contents can be programmatically read or edited later. A document can contain multiple named ranges with the same name, but every named range has a unique ID. A named range is created with a single Range, and content inserted inside a named range generally expands that range. However, certain document changes can cause the range to be split into multiple ranges. Named ranges are not private. All applications and collaborators that have access to the document can see its named ranges.
Instance Attribute Summary collapse
-
#name ⇒ String
The name of the named range.
-
#named_range_id ⇒ String
The ID of the named range.
-
#ranges ⇒ Array<Google::Apis::DocsV1::Range>
The ranges that belong to this named range.
Instance Method Summary collapse
-
#initialize(**args) ⇒ NamedRange
constructor
A new instance of NamedRange.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ NamedRange
Returns a new instance of NamedRange.
2876 2877 2878 |
# File 'lib/google/apis/docs_v1/classes.rb', line 2876 def initialize(**args) update!(**args) end |
Instance Attribute Details
#name ⇒ String
The name of the named range.
Corresponds to the JSON property name
2864 2865 2866 |
# File 'lib/google/apis/docs_v1/classes.rb', line 2864 def name @name end |
#named_range_id ⇒ String
The ID of the named range.
Corresponds to the JSON property namedRangeId
2869 2870 2871 |
# File 'lib/google/apis/docs_v1/classes.rb', line 2869 def named_range_id @named_range_id end |
#ranges ⇒ Array<Google::Apis::DocsV1::Range>
The ranges that belong to this named range.
Corresponds to the JSON property ranges
2874 2875 2876 |
# File 'lib/google/apis/docs_v1/classes.rb', line 2874 def ranges @ranges end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2881 2882 2883 2884 2885 |
# File 'lib/google/apis/docs_v1/classes.rb', line 2881 def update!(**args) @name = args[:name] if args.key?(:name) @named_range_id = args[:named_range_id] if args.key?(:named_range_id) @ranges = args[:ranges] if args.key?(:ranges) end |