Class: Typhoid::TyphoeusDescriptor

Inherits:
Object
  • Object
show all
Defined in:
lib/typhoid.rb

Instance Method Summary collapse

Instance Method Details

#bug_versionObject



30
31
32
# File 'lib/typhoid.rb', line 30

def bug_version
  matched_version[:bug].to_i
end

#major_versionObject



22
23
24
# File 'lib/typhoid.rb', line 22

def major_version
  matched_version[:major].to_i
end

#matched_versionObject



18
19
20
# File 'lib/typhoid.rb', line 18

def matched_version
  version.to_s.match /(?<major>\d+)\.(?<minor>\d+)\.(?<bug>\d+)/
end

#minor_versionObject



26
27
28
# File 'lib/typhoid.rb', line 26

def minor_version
  matched_version[:minor].to_i
end

#versionObject



14
15
16
# File 'lib/typhoid.rb', line 14

def version
  Typhoeus::VERSION
end