Module: Sinatra::Contrib::VERSION
- Extended by:
- Comparable
- Defined in:
- lib/sinatra/contrib/version.rb
Constant Summary collapse
Class Method Summary collapse
- .<=>(other) ⇒ Object
- .hash ⇒ Object
- .inspect ⇒ Object
- .major ⇒ Object
- .method_missing(meth, *args, &block) ⇒ Object
- .minor ⇒ Object
- .respond_to?(meth) ⇒ Boolean
- .tiny ⇒ Object
- .to_s ⇒ Object
Class Method Details
.<=>(other) ⇒ Object
25 26 27 28 |
# File 'lib/sinatra/contrib/version.rb', line 25 def self.<=>(other) other = other.split('.').map { |i| i.to_i } if other.respond_to? :split SIGNATURE <=> Array(other) end |
.hash ⇒ Object
21 22 23 |
# File 'lib/sinatra/contrib/version.rb', line 21 def self.hash STRING.hash end |
.inspect ⇒ Object
30 31 32 |
# File 'lib/sinatra/contrib/version.rb', line 30 def self.inspect STRING.inspect end |
.major ⇒ Object
16 |
# File 'lib/sinatra/contrib/version.rb', line 16 def self.major; MAJOR end |
.method_missing(meth, *args, &block) ⇒ Object
39 40 41 42 |
# File 'lib/sinatra/contrib/version.rb', line 39 def self.method_missing(meth, *args, &block) return super unless STRING.respond_to?(meth) STRING.send(meth, *args, &block) end |
.minor ⇒ Object
17 |
# File 'lib/sinatra/contrib/version.rb', line 17 def self.minor; MINOR end |
.respond_to?(meth) ⇒ Boolean
34 35 36 37 |
# File 'lib/sinatra/contrib/version.rb', line 34 def self.respond_to?(meth, *) return true if super meth.to_s !~ /^__|^to_str$/ and STRING.respond_to? meth end |
.tiny ⇒ Object
18 |
# File 'lib/sinatra/contrib/version.rb', line 18 def self.tiny; TINY end |
.to_s ⇒ Object
19 |
# File 'lib/sinatra/contrib/version.rb', line 19 def self.to_s; STRING end |