Parent

Class Index [+]

Quicksearch

Jeweler::VersionHelper

Attributes

base_dir[RW]
major[R]
minor[R]
patch[R]
build[R]

Public Class Methods

new(base_dir) click to toggle source
    # File lib/jeweler/version_helper.rb, line 81
81:     def initialize(base_dir)
82:       self.base_dir = base_dir
83: 
84:       if File.exists?(yaml_path)
85:         extend YamlExtension
86:         parse_yaml
87:       else
88:         extend PlaintextExtension
89:         if File.exists?(plaintext_path)
90:           parse_plaintext
91:         end
92:       end
93:     end

Public Instance Methods

bump_major() click to toggle source
     # File lib/jeweler/version_helper.rb, line 95
 95:     def bump_major
 96:       @major += 1
 97:       @minor = 0
 98:       @patch = 0
 99:       @build = nil
100:     end
bump_minor() click to toggle source
     # File lib/jeweler/version_helper.rb, line 102
102:     def bump_minor
103:       @minor += 1
104:       @patch = 0
105:       @build = nil
106:     end
bump_patch() click to toggle source
     # File lib/jeweler/version_helper.rb, line 108
108:     def bump_patch
109:       @patch += 1
110:       @build = nil
111:     end
plaintext_path() click to toggle source
     # File lib/jeweler/version_helper.rb, line 130
130:     def plaintext_path
131:       denormalized_path = File.join(@base_dir, 'VERSION')
132:       absolute_path = File.expand_path(denormalized_path)
133:       absolute_path.gsub(Dir.getwd + File::SEPARATOR, '')
134:     end
to_s() click to toggle source
     # File lib/jeweler/version_helper.rb, line 120
120:     def to_s
121:       [major, minor, patch, build].compact.join('.')
122:     end
update_to(major, minor, patch, build=nil) click to toggle source
     # File lib/jeweler/version_helper.rb, line 113
113:     def update_to(major, minor, patch, build=nil)
114:       @major = major
115:       @minor = minor
116:       @patch = patch
117:       @build = build
118:     end
yaml_path() click to toggle source
     # File lib/jeweler/version_helper.rb, line 124
124:     def yaml_path
125:       denormalized_path = File.join(@base_dir, 'VERSION.yml')
126:       absolute_path = File.expand_path(denormalized_path)
127:       absolute_path.gsub(Dir.getwd + File::SEPARATOR, '')
128:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.