Class: Crystalball::ExecutionMap::Metadata
- Inherits:
-
Object
- Object
- Crystalball::ExecutionMap::Metadata
- Defined in:
- lib/crystalball/execution_map.rb
Overview
Simple data object for map metadata information
Instance Attribute Summary collapse
-
#commit ⇒ Object
readonly
Returns the value of attribute commit.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(commit: nil, type: nil, version: nil, timestamp: nil) ⇒ Metadata
constructor
A new instance of Metadata.
- #to_h ⇒ Object
Constructor Details
#initialize(commit: nil, type: nil, version: nil, timestamp: nil) ⇒ Metadata
Returns a new instance of Metadata.
15 16 17 18 19 20 |
# File 'lib/crystalball/execution_map.rb', line 15 def initialize(commit: nil, type: nil, version: nil, timestamp: nil) @commit = commit @type = type @timestamp = @version = version end |
Instance Attribute Details
#commit ⇒ Object (readonly)
Returns the value of attribute commit.
10 11 12 |
# File 'lib/crystalball/execution_map.rb', line 10 def commit @commit end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
10 11 12 |
# File 'lib/crystalball/execution_map.rb', line 10 def @timestamp end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
10 11 12 |
# File 'lib/crystalball/execution_map.rb', line 10 def type @type end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
10 11 12 |
# File 'lib/crystalball/execution_map.rb', line 10 def version @version end |
Instance Method Details
#to_h ⇒ Object
22 23 24 |
# File 'lib/crystalball/execution_map.rb', line 22 def to_h {type: type, commit: commit, timestamp: , version: version} end |