Class: RakeVersion::Manager
- Inherits:
-
Object
- Object
- RakeVersion::Manager
- Defined in:
- lib/rake-version/manager.rb
Instance Method Summary collapse
- #bump(type) ⇒ Object
- #config=(config) ⇒ Object
-
#initialize ⇒ Manager
constructor
A new instance of Manager.
- #set(version_string) ⇒ Object
- #version ⇒ Object
- #with_context(context) {|_self| ... } ⇒ Object
Constructor Details
#initialize ⇒ Manager
Returns a new instance of Manager.
6 7 8 |
# File 'lib/rake-version/manager.rb', line 6 def initialize @copiers = [] end |
Instance Method Details
#bump(type) ⇒ Object
20 21 22 23 |
# File 'lib/rake-version/manager.rb', line 20 def bump type check_context copy save(version.bump(type)) end |
#config=(config) ⇒ Object
25 26 27 28 |
# File 'lib/rake-version/manager.rb', line 25 def config= config @copiers = config.copiers self end |
#set(version_string) ⇒ Object
15 16 17 18 |
# File 'lib/rake-version/manager.rb', line 15 def set version_string check_context copy save(RakeVersion::Version.new.from_s(version_string)) end |
#version ⇒ Object
10 11 12 13 |
# File 'lib/rake-version/manager.rb', line 10 def version check_context RakeVersion::Version.new.from_s read_version end |
#with_context(context) {|_self| ... } ⇒ Object
30 31 32 33 34 35 |
# File 'lib/rake-version/manager.rb', line 30 def with_context context, &block @context = context yield self if block_given? @context = nil self end |