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