class STAC::Provider
Represents STAC provider object, which provides information about a provider.
Specicication: github.com/radiantearth/stac-spec/blob/master/collection-spec/collection-spec.md#provider-object
Attributes
description[RW]
name[RW]
roles[RW]
url[RW]
Public Class Methods
from_hash(hash)
click to toggle source
Deserializes a Provider
from a Hash.
# File lib/stac/provider.rb, line 14 def from_hash(hash) new(**hash.transform_keys(&:to_sym)) end
new(name:, description: nil, roles: nil, url: nil, **extra)
click to toggle source
# File lib/stac/provider.rb, line 21 def initialize(name:, description: nil, roles: nil, url: nil, **extra) @name = name @description = description @roles = roles @url = url @extra = extra.transform_keys(&:to_s) end
Public Instance Methods
to_h()
click to toggle source
Serializes self to a Hash.
# File lib/stac/provider.rb, line 30 def to_h { 'name' => name, 'description' => description, 'roles' => roles, 'url' => url, }.merge(extra).compact end