Class: IngvQuake::CreationInfo
- Inherits:
-
Object
- Object
- IngvQuake::CreationInfo
- 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
-
#agency_id ⇒ String
readonly
Designation of agency that published a resource.
-
#author ⇒ String
readonly
Name describing the author of a resource.
-
#creation_time ⇒ String
readonly
Time of creation of a resource, in ISO 8601 format.
-
#id_locator ⇒ String
readonly
The ID locator of the creation info.
-
#version ⇒ String
readonly
Version string of a resource.
Instance Method Summary collapse
-
#initialize(data) ⇒ CreationInfo
constructor
Initializes a new CreationInfo instance with the provided data.
Constructor Details
#initialize(data) ⇒ CreationInfo
Initializes a new CreationInfo instance with the provided data.
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_id ⇒ String (readonly)
Designation of agency that published a resource. The string has a maximum length of 64 characters.
11 12 13 |
# File 'lib/ingv_quake/models/creation_info.rb', line 11 def agency_id @agency_id end |
#author ⇒ String (readonly)
Name describing the author of a resource. The string has a maximum length of 128 characters.
11 12 13 |
# File 'lib/ingv_quake/models/creation_info.rb', line 11 def @author end |
#creation_time ⇒ String (readonly)
Time of creation of a resource, in ISO 8601 format. It has to be given in UTC.
11 12 13 |
# File 'lib/ingv_quake/models/creation_info.rb', line 11 def creation_time @creation_time end |
#id_locator ⇒ String (readonly)
The ID locator of the creation info.
11 12 13 |
# File 'lib/ingv_quake/models/creation_info.rb', line 11 def id_locator @id_locator end |
#version ⇒ String (readonly)
Version string of a resource.
11 12 13 |
# File 'lib/ingv_quake/models/creation_info.rb', line 11 def version @version end |