Class: Magick::Versioning::Version
- Inherits:
-
Object
- Object
- Magick::Versioning::Version
- Defined in:
- lib/magick/versioning.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#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, action: nil, timestamp: nil) ⇒ Version
constructor
A new instance of Version.
- #to_h ⇒ Object
Constructor Details
#initialize(version, feature_data, created_by: nil, action: nil, timestamp: nil) ⇒ Version
Returns a new instance of Version.
42 43 44 45 46 47 48 |
# File 'lib/magick/versioning.rb', line 42 def initialize(version, feature_data, created_by: nil, action: nil, timestamp: nil) @version = version @feature_data = feature_data @timestamp = || Time.now @created_by = created_by @action = action end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
40 41 42 |
# File 'lib/magick/versioning.rb', line 40 def action @action end |
#created_by ⇒ Object (readonly)
Returns the value of attribute created_by.
40 41 42 |
# File 'lib/magick/versioning.rb', line 40 def created_by @created_by end |
#feature_data ⇒ Object (readonly)
Returns the value of attribute feature_data.
40 41 42 |
# File 'lib/magick/versioning.rb', line 40 def feature_data @feature_data end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
40 41 42 |
# File 'lib/magick/versioning.rb', line 40 def @timestamp end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
40 41 42 |
# File 'lib/magick/versioning.rb', line 40 def version @version end |
Instance Method Details
#to_h ⇒ Object
50 51 52 53 54 55 56 57 58 |
# File 'lib/magick/versioning.rb', line 50 def to_h { version: version, feature_data: feature_data, timestamp: .iso8601, created_by: created_by, action: action } end |