Class: Releaseko::AppVersion
- Inherits:
-
Object
- Object
- Releaseko::AppVersion
- Defined in:
- lib/releaseko/app_version.rb
Overview
Class responsible for managing the file ./metadata/app-version.
Constant Summary collapse
- METHODS =
%w[major minor build].freeze
- FILE_PATH =
File.join(Dir.pwd, 'metadata', 'app-version').freeze
Instance Attribute Summary collapse
-
#breakdown ⇒ Object
readonly
Returns the value of attribute breakdown.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
Instance Method Summary collapse
-
#initialize(method) ⇒ AppVersion
constructor
A new instance of AppVersion.
- #perform ⇒ Object
Constructor Details
#initialize(method) ⇒ AppVersion
Returns a new instance of AppVersion.
11 12 13 14 |
# File 'lib/releaseko/app_version.rb', line 11 def initialize(method) @method = method validate! end |
Instance Attribute Details
#breakdown ⇒ Object (readonly)
Returns the value of attribute breakdown.
9 10 11 |
# File 'lib/releaseko/app_version.rb', line 9 def breakdown @breakdown end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
9 10 11 |
# File 'lib/releaseko/app_version.rb', line 9 def method @method end |
Instance Method Details
#perform ⇒ Object
16 17 18 19 20 |
# File 'lib/releaseko/app_version.rb', line 16 def perform breakdown_version increment_on_method build_version! end |