Module: Onetime::API::VERSION

Defined in:
lib/onetime/api.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.pathObject (readonly)

Returns the value of attribute path.



40
41
42
# File 'lib/onetime/api.rb', line 40

def path
  @path
end

.versionObject (readonly)

Returns the value of attribute version.



40
41
42
# File 'lib/onetime/api.rb', line 40

def version
  @version
end

Class Method Details

.inspectObject



51
# File 'lib/onetime/api.rb', line 51

def inspect()  version              end

.prerelease?Boolean

Returns:

  • (Boolean)


48
# File 'lib/onetime/api.rb', line 48

def prerelease?() false end

.read_versionObject



44
45
46
47
# File 'lib/onetime/api.rb', line 44

def read_version
  return if @version
  @version = File.read(path).strip!
end

.to_aObject



49
# File 'lib/onetime/api.rb', line 49

def to_a()     version.split('.')   end

.to_sObject



50
# File 'lib/onetime/api.rb', line 50

def to_s()     version              end