Class: Google::Apis::WebfontsV1::Webfont

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

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) ⇒ Webfont

Returns a new instance of Webfont



70
71
72
# File 'generated/google/apis/webfonts_v1/classes.rb', line 70

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

Instance Attribute Details

#categoryString

The category of the font. Corresponds to the JSON property category

Returns:

  • (String)


32
33
34
# File 'generated/google/apis/webfonts_v1/classes.rb', line 32

def category
  @category
end

#familyString

The name of the font. Corresponds to the JSON property family

Returns:

  • (String)


37
38
39
# File 'generated/google/apis/webfonts_v1/classes.rb', line 37

def family
  @family
end

#filesHash<String,String>

The font files (with all supported scripts) for each one of the available variants, as a key : value map. Corresponds to the JSON property files

Returns:

  • (Hash<String,String>)


43
44
45
# File 'generated/google/apis/webfonts_v1/classes.rb', line 43

def files
  @files
end

#kindString

This kind represents a webfont object in the webfonts service. Corresponds to the JSON property kind

Returns:

  • (String)


48
49
50
# File 'generated/google/apis/webfonts_v1/classes.rb', line 48

def kind
  @kind
end

#last_modifiedDate

The date (format "yyyy-MM-dd") the font was modified for the last time. Corresponds to the JSON property lastModified

Returns:

  • (Date)


53
54
55
# File 'generated/google/apis/webfonts_v1/classes.rb', line 53

def last_modified
  @last_modified
end

#subsetsArray<String>

The scripts supported by the font. Corresponds to the JSON property subsets

Returns:

  • (Array<String>)


58
59
60
# File 'generated/google/apis/webfonts_v1/classes.rb', line 58

def subsets
  @subsets
end

#variantsArray<String>

The available variants for the font. Corresponds to the JSON property variants

Returns:

  • (Array<String>)


63
64
65
# File 'generated/google/apis/webfonts_v1/classes.rb', line 63

def variants
  @variants
end

#versionString

The font version. Corresponds to the JSON property version

Returns:

  • (String)


68
69
70
# File 'generated/google/apis/webfonts_v1/classes.rb', line 68

def version
  @version
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



75
76
77
78
79
80
81
82
83
84
# File 'generated/google/apis/webfonts_v1/classes.rb', line 75

def update!(**args)
  @category = args[:category] if args.key?(:category)
  @family = args[:family] if args.key?(:family)
  @files = args[:files] if args.key?(:files)
  @kind = args[:kind] if args.key?(:kind)
  @last_modified = args[:last_modified] if args.key?(:last_modified)
  @subsets = args[:subsets] if args.key?(:subsets)
  @variants = args[:variants] if args.key?(:variants)
  @version = args[:version] if args.key?(:version)
end