Module: FancyButtons::Version

Included in:
FancyButtons
Defined in:
lib/version.rb

Instance Method Summary collapse

Instance Method Details

#versionObject

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 Compass by Chris Eppstein who swiped it from Haml and then modified it, so some credit goes to Nathan Weizenbaum too.



9
10
11
12
13
14
15
# File 'lib/version.rb', line 9

def version
  if defined?(@version)
    @version
  else
    read_version
  end
end