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.
18 19 20 21 22 23 24 |
# File 'lib/magick/versioning.rb', line 18 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.
16 17 18 |
# File 'lib/magick/versioning.rb', line 16 def action @action end |
#created_by ⇒ Object (readonly)
Returns the value of attribute created_by.
16 17 18 |
# File 'lib/magick/versioning.rb', line 16 def created_by @created_by end |
#feature_data ⇒ Object (readonly)
Returns the value of attribute feature_data.
16 17 18 |
# File 'lib/magick/versioning.rb', line 16 def feature_data @feature_data end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
16 17 18 |
# File 'lib/magick/versioning.rb', line 16 def @timestamp end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
16 17 18 |
# File 'lib/magick/versioning.rb', line 16 def version @version end |
Instance Method Details
#to_h ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/magick/versioning.rb', line 26 def to_h { version: version, feature_data: feature_data, timestamp: .iso8601, created_by: created_by, action: action } end |