module Compass::Version
Public Instance Methods
parse_version(version, name)
click to toggle source
# File lib/compass/version.rb, line 8 def parse_version(version, name) nil_or_int = lambda{|i| i.nil? ? nil : i.to_i} segments = version.split(".") { :string => version, :name => name, :major => nil_or_int.call(segments.shift), :minor => nil_or_int.call(segments.shift), :patch => nil_or_int.call(segments.shift), :state => segments.shift, :iteration => nil_or_int.call(segments.shift) } end
version()
click to toggle source
Returns a hash representing the version. The :major, :minor, and :teeny keys have their respective numbers. The :string key contains a human-readable string representation of the version. The :rev key will have the current revision hash.
This method swiped from Haml and then modified, some credit goes to Nathan Weizenbaum
# File lib/compass/version.rb, line 28 def version Compass::VERSION_DETAILS end