Module: CollinsNotify::Version

Defined in:
lib/collins_notify/version.rb

Class Method Summary collapse

Class Method Details

.locationObject



7
8
9
# File 'lib/collins_notify/version.rb', line 7

def location
  @location || File.absolute_path(File.join(File.dirname(__FILE__), '..', '..', 'VERSION'))
end

.location=(loc) ⇒ Object



4
5
6
# File 'lib/collins_notify/version.rb', line 4

def location= loc
  @location = loc
end

.to_sObject



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

def to_s
  if location && File.exists?(location) then
    File.read(location)
  else
    "0.0.0-pre"
  end
end