Class: Google::Apis::CivicinfoV2::Source

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/civicinfo_v2/classes.rb,
lib/google/apis/civicinfo_v2/representations.rb,
lib/google/apis/civicinfo_v2/representations.rb

Overview

Contains information about the data source for the element containing it.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Source

Returns a new instance of Source.



1148
1149
1150
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1148

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

Instance Attribute Details

#nameString

The name of the data source. Corresponds to the JSON property name

Returns:

  • (String)


1140
1141
1142
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1140

def name
  @name
end

#officialBoolean Also known as: official?

Whether this data comes from an official government source. Corresponds to the JSON property official

Returns:

  • (Boolean)


1145
1146
1147
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1145

def official
  @official
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1153
1154
1155
1156
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1153

def update!(**args)
  @name = args[:name] if args.key?(:name)
  @official = args[:official] if args.key?(:official)
end