Skip to content

Commit

Permalink
Refactored Version slightly to allow for specific parts of the versio…
Browse files Browse the repository at this point in the history
…n (major, minor, tiny, or build) to be accessed.

This could be useful for plugin authors to ensure that their plugins are backwards compatible.
  • Loading branch information
Steven Heidel authored and parndt committed Jul 19, 2010
1 parent ddd82c5 commit ca1d9af
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion vendor/plugins/refinery/lib/refinery.rb
Expand Up @@ -24,8 +24,17 @@ def version
end

class Version
class << self
attr_reader :major, :minor, :tiny, :build
end

@major = 0
@minor = 9
@tiny = 7
@build = 7

def self.to_s
%q{0.9.7.7}
[@major, @minor, @tiny, @build].compact.join('.')
end
end

Expand Down

0 comments on commit ca1d9af

Please sign in to comment.