Class: Google::Apis::DocsV1::NamedRange

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NamedRange

Returns a new instance of NamedRange.



3257
3258
3259
# File 'lib/google/apis/docs_v1/classes.rb', line 3257

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

Instance Attribute Details

#nameString

The name of the named range. Corresponds to the JSON property name

Returns:

  • (String)


3245
3246
3247
# File 'lib/google/apis/docs_v1/classes.rb', line 3245

def name
  @name
end

#named_range_idString

The ID of the named range. Corresponds to the JSON property namedRangeId

Returns:

  • (String)


3250
3251
3252
# File 'lib/google/apis/docs_v1/classes.rb', line 3250

def named_range_id
  @named_range_id
end

#rangesArray<Google::Apis::DocsV1::Range>

The ranges that belong to this named range. Corresponds to the JSON property ranges

Returns:



3255
3256
3257
# File 'lib/google/apis/docs_v1/classes.rb', line 3255

def ranges
  @ranges
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3262
3263
3264
3265
3266
# File 'lib/google/apis/docs_v1/classes.rb', line 3262

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