Class: Bueller::Commands::Version::Write

Inherits:
Base
  • Object
show all
Defined in:
lib/bueller/commands/version/write.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#bueller, #gemspec, #version_helper

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#commit, #commit_version, #gemspec_helper, #initialize, #repo, #run

Constructor Details

This class inherits a constructor from Bueller::Commands::Version::Base

Instance Attribute Details

#buildObject

Returns the value of attribute build.



14
15
16
# File 'lib/bueller/commands/version/write.rb', line 14

def build
  @build
end

#majorObject

Returns the value of attribute major.



14
15
16
# File 'lib/bueller/commands/version/write.rb', line 14

def major
  @major
end

#minorObject

Returns the value of attribute minor.



14
15
16
# File 'lib/bueller/commands/version/write.rb', line 14

def minor
  @minor
end

#patchObject

Returns the value of attribute patch.



14
15
16
# File 'lib/bueller/commands/version/write.rb', line 14

def patch
  @patch
end

Class Method Details

.run_for(bueller, major, minor, patch, build) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/bueller/commands/version/write.rb', line 5

def self.run_for(bueller, major, minor, patch, build)
  command = new bueller
  command.major = major
  command.minor = minor
  command.patch = patch
  command.build = build
  command.run
end

Instance Method Details

#update_versionObject



15
16
17
# File 'lib/bueller/commands/version/write.rb', line 15

def update_version
  version_helper.update_to major, minor, patch, build
end