Class: Rice::Native

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/rice/native.rb

Instance Method Summary collapse

Instance Method Details

#<=>(other) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/rice/native.rb', line 5

def <=>(other)
  case
    when self.name == other.name
      self.parameters.size <=> other.parameters.size
    when self.name == "initialize"
      -1
    when self.name == "initialize"
      1
    else
      self.name <=> other.name
  end
end