Class: Magick::Versioning::Version
- Inherits:
-
Object
- Object
- Magick::Versioning::Version
- Defined in:
- lib/magick/versioning.rb
Instance Attribute Summary collapse
-
#created_by ⇒ Object
readonly
Returns the value of attribute created_by.
-
#feature_data ⇒ Object
readonly
Returns the value of attribute feature_data.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(version, feature_data, created_by: nil) ⇒ Version
constructor
A new instance of Version.
- #to_h ⇒ Object
Constructor Details
#initialize(version, feature_data, created_by: nil) ⇒ Version
Returns a new instance of Version.
8 9 10 11 12 13 |
# File 'lib/magick/versioning.rb', line 8 def initialize(version, feature_data, created_by: nil) @version = version @feature_data = feature_data = Time.now @created_by = created_by end |
Instance Attribute Details
#created_by ⇒ Object (readonly)
Returns the value of attribute created_by.
6 7 8 |
# File 'lib/magick/versioning.rb', line 6 def created_by @created_by end |
#feature_data ⇒ Object (readonly)
Returns the value of attribute feature_data.
6 7 8 |
# File 'lib/magick/versioning.rb', line 6 def feature_data @feature_data end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
6 7 8 |
# File 'lib/magick/versioning.rb', line 6 def end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
6 7 8 |
# File 'lib/magick/versioning.rb', line 6 def version @version end |
Instance Method Details
#to_h ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/magick/versioning.rb', line 15 def to_h { version: version, feature_data: feature_data, timestamp: .iso8601, created_by: created_by } end |