Class: Versioneer::Bypass
Constant Summary collapse
- H =
Helpers
Instance Attribute Summary collapse
-
#commits_since_release ⇒ Object
Returns the value of attribute commits_since_release.
Attributes inherited from Repo
#bump_segment, #environment, #prereleases, #release_pattern, #starting_release
Instance Method Summary collapse
- #filesystem_dirty=(v) ⇒ Object
- #filesystem_dirty? ⇒ Boolean
-
#initialize(file_within_repo, options = nil) ⇒ Bypass
constructor
A new instance of Bypass.
- #release ⇒ Object
- #release=(v) ⇒ Object
Methods inherited from Repo
bump, segment_to_i, #to_s, #version
Constructor Details
#initialize(file_within_repo, options = nil) ⇒ Bypass
Returns a new instance of Bypass.
7 8 9 10 11 12 |
# File 'lib/versioneer/bypass.rb', line 7 def initialize(file_within_repo, =nil) raise InvalidRepoError if [:invalid] super @commits_since_release = 0 @filesystem_dirty = false end |
Instance Attribute Details
#commits_since_release ⇒ Object
Returns the value of attribute commits_since_release.
23 24 25 |
# File 'lib/versioneer/bypass.rb', line 23 def commits_since_release @commits_since_release end |
Instance Method Details
#filesystem_dirty=(v) ⇒ Object
29 30 31 |
# File 'lib/versioneer/bypass.rb', line 29 def filesystem_dirty=(v) @filesystem_dirty = v end |
#filesystem_dirty? ⇒ Boolean
25 26 27 |
# File 'lib/versioneer/bypass.rb', line 25 def filesystem_dirty? @filesystem_dirty end |
#release ⇒ Object
14 15 16 |
# File 'lib/versioneer/bypass.rb', line 14 def release @release || super end |
#release=(v) ⇒ Object
18 19 20 21 |
# File 'lib/versioneer/bypass.rb', line 18 def release=(v) v = ::Gem::Version.new(v) if v.is_a? String @release = v end |