Class: IngvQuake::CreationInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/ingv_quake/models/creation_info.rb

Overview

The CreationInfo class represents the metadata related to the creation of an event record

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ CreationInfo

Initializes a new CreationInfo instance with the provided data.

Parameters:

  • data (Hash)

    A hash containing detailed information about the creation of an event.



17
18
19
20
21
22
23
# File 'lib/ingv_quake/models/creation_info.rb', line 17

def initialize(data)
  @agency_id = data.fetch('agencyID', nil)
  @author = data.fetch('author', nil)
  @creation_time = data.fetch('creationTime', nil)
  @id_locator = data.fetch('id_locator', nil)
  @version = data.fetch('version', nil)
end

Instance Attribute Details

#agency_idString (readonly)

Designation of agency that published a resource. The string has a maximum length of 64 characters.

Returns:

  • (String)

    the current value of agency_id



11
12
13
# File 'lib/ingv_quake/models/creation_info.rb', line 11

def agency_id
  @agency_id
end

#authorString (readonly)

Name describing the author of a resource. The string has a maximum length of 128 characters.

Returns:

  • (String)

    the current value of author



11
12
13
# File 'lib/ingv_quake/models/creation_info.rb', line 11

def author
  @author
end

#creation_timeString (readonly)

Time of creation of a resource, in ISO 8601 format. It has to be given in UTC.

Returns:

  • (String)

    the current value of creation_time



11
12
13
# File 'lib/ingv_quake/models/creation_info.rb', line 11

def creation_time
  @creation_time
end

#id_locatorString (readonly)

The ID locator of the creation info.

Returns:

  • (String)

    the current value of id_locator



11
12
13
# File 'lib/ingv_quake/models/creation_info.rb', line 11

def id_locator
  @id_locator
end

#versionString (readonly)

Version string of a resource.

Returns:

  • (String)

    the current value of version



11
12
13
# File 'lib/ingv_quake/models/creation_info.rb', line 11

def version
  @version
end