Module: MediaInfo::VERSION
- Extended by:
- Comparable
- Defined in:
- lib/mediainfo/version.rb
Overview
Probably overkill, but why. This is all a thin wrapper around the string in VERSION::STRING
Constant Summary collapse
- MAJOR =
The major version number of the gem. Anything that depends on on this gem is likely to break when this changes.
1
- MINOR =
The minor version number. Changes here could break external dependencies on rare occasions, but effort will be taken to avoid that. New features usually increment this value.
0
- PATCH =
The patch-level version number. Changes here should never break anything, and usually represent bugfixes.
3
- SIGNATURE =
The whole version number, in array form.
[MAJOR, MINOR, PATCH]
- STRING =
The whole version number, in gemspec-compatible string form. When in doubt, you probably want this version.
SIGNATURE.join '.'
Delegating Into STRING collapse
-
.hash ⇒ Int
Is a thin wrapper around String.
- .method_missing(meth, *args, &block) ⇒ Object
- .respond_to?(meth) ⇒ Boolean
Class Method Summary collapse
- .<=>(other) ⇒ -1, ...
-
.inspect ⇒ String
the VERSION module itself.
-
.to_s ⇒ String
the VERSION module itself.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object (private)
56 57 58 59 |
# File 'lib/mediainfo/version.rb', line 56 def method_missing(meth, *args, &block) return super unless STRING.respond_to?(meth) STRING.send(meth, *args, &block) end |
Class Method Details
.<=>(other) ⇒ -1, ...
38 39 40 41 |
# File 'lib/mediainfo/version.rb', line 38 def <=>(other) other = other.split('.').map { |i| i.to_i } if other.respond_to? :split SIGNATURE <=> Array(other) end |
.hash ⇒ Int
Returns is a thin wrapper around String.
46 47 48 |
# File 'lib/mediainfo/version.rb', line 46 def hash STRING.hash end |
.inspect ⇒ String
the VERSION module itself
29 30 31 |
# File 'lib/mediainfo/version.rb', line 29 def inspect STRING.inspect end |
.method_missing(meth, *args, &block) ⇒ Object
56 57 58 59 |
# File 'lib/mediainfo/version.rb', line 56 def method_missing(meth, *args, &block) return super unless STRING.respond_to?(meth) STRING.send(meth, *args, &block) end |
.respond_to?(meth) ⇒ Boolean
52 53 54 |
# File 'lib/mediainfo/version.rb', line 52 def respond_to?(meth, *) meth.to_s !~ /^__|^to_str$/ and STRING.respond_to? meth unless super end |