Class: Stepmod::Utils::ChangeEdition
- Inherits:
-
Object
- Object
- Stepmod::Utils::ChangeEdition
- Defined in:
- lib/stepmod/utils/change_edition.rb
Instance Attribute Summary collapse
-
#additions ⇒ Object
Returns the value of attribute additions.
-
#deletions ⇒ Object
Returns the value of attribute deletions.
-
#description ⇒ Object
Returns the value of attribute description.
-
#mapping ⇒ Object
Returns the value of attribute mapping.
-
#modifications ⇒ Object
Returns the value of attribute modifications.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(options) ⇒ ChangeEdition
constructor
A new instance of ChangeEdition.
- #to_h ⇒ Object
Constructor Details
#initialize(options) ⇒ ChangeEdition
Returns a new instance of ChangeEdition.
7 8 9 10 11 12 13 14 |
# File 'lib/stepmod/utils/change_edition.rb', line 7 def initialize() @version = [:version] @description = [:description] self.additions = [:additions] || [] self.modifications = [:modifications] || [] self.deletions = [:deletions] || [] self.mapping = [:mapping] || [] end |
Instance Attribute Details
#additions ⇒ Object
Returns the value of attribute additions.
5 6 7 |
# File 'lib/stepmod/utils/change_edition.rb', line 5 def additions @additions end |
#deletions ⇒ Object
Returns the value of attribute deletions.
5 6 7 |
# File 'lib/stepmod/utils/change_edition.rb', line 5 def deletions @deletions end |
#description ⇒ Object
Returns the value of attribute description.
4 5 6 |
# File 'lib/stepmod/utils/change_edition.rb', line 4 def description @description end |
#mapping ⇒ Object
Returns the value of attribute mapping.
5 6 7 |
# File 'lib/stepmod/utils/change_edition.rb', line 5 def mapping @mapping end |
#modifications ⇒ Object
Returns the value of attribute modifications.
5 6 7 |
# File 'lib/stepmod/utils/change_edition.rb', line 5 def modifications @modifications end |
#version ⇒ Object
Returns the value of attribute version.
4 5 6 |
# File 'lib/stepmod/utils/change_edition.rb', line 4 def version @version end |
Instance Method Details
#to_h ⇒ Object
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/stepmod/utils/change_edition.rb', line 40 def to_h { "version" => version, "description" => description, "additions" => additions, "modifications" => modifications, "deletions" => deletions, "mapping" => mapping, }.reject { |_k, v| v.nil? || v.empty? } end |