Module: Twitter::Version

Defined in:
lib/twitter/version.rb

Class Method Summary collapse

Class Method Details

.majorInteger

Returns:

  • (Integer)


6
7
8
# File 'lib/twitter/version.rb', line 6

def major
  8
end

.minorInteger

Returns:

  • (Integer)


11
12
13
# File 'lib/twitter/version.rb', line 11

def minor
  1
end

.patchInteger

Returns:

  • (Integer)


16
17
18
# File 'lib/twitter/version.rb', line 16

def patch
  0
end

.preInteger, NilClass

Returns:

  • (Integer, NilClass)


21
22
23
# File 'lib/twitter/version.rb', line 21

def pre
  nil
end

.to_aArray

Returns:

  • (Array)


31
32
33
# File 'lib/twitter/version.rb', line 31

def to_a
  [major, minor, patch, pre].compact
end

.to_hHash

Returns:

  • (Hash)


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

def to_h
  {major:, minor:, patch:, pre:}
end

.to_sString

Returns:

  • (String)


36
37
38
# File 'lib/twitter/version.rb', line 36

def to_s
  to_a.join(".")
end