class STAC::Extent::Temporal
Describes the temporal extents of a collection.
Attributes
interval[RW]
Public Class Methods
from_hash(hash)
click to toggle source
Deserializes a Temporal
from a Hash.
# File lib/stac/extent.rb, line 67 def self.from_hash(hash) new(**hash.transform_keys(&:to_sym)) end
new(interval:, **extra)
click to toggle source
# File lib/stac/extent.rb, line 73 def initialize(interval:, **extra) @interval = interval @extra = extra.transform_keys(&:to_s) end
Public Instance Methods
to_h()
click to toggle source
Serializes self to a Hash.
# File lib/stac/extent.rb, line 79 def to_h { 'interval' => interval, }.merge(extra) end