Ruby methoswith operator-style syntactic sugar calling notat
3427 ワード
1, +
Definition:
Calling:
Sugared notation:
2, -
Definition:
Calling:
Sugared notation:
3, *
Definition:
Calling:
Sugared notation:
4,/
Definition:
Calling:
Sugared notation:
5, %
Definition:
Calling:
Sugared notation:
6, []
Definition:
Calling:
Sugared notation:
7, []=
Definition:
Calling:
Sugared notation:
8, <<
Definition:
Calling:
Sugared notation:
9, ==
Definition:
Calling:
Sugared notation:
10, >
Definition:
Calling:
Sugared notation:
11, <
Definition:
Calling:
Sugared notation:
12, >=
Definition:
Calling:
Sugared notation:
13, <=
Definition:
Calling:
Sugared notation:
14, ===
Definition:
Calling:
Sugared notation:
Definition:
def +(x)
Calling:
obj.+(x)
Sugared notation:
obj + x
2, -
Definition:
def -(x)
Calling:
obj.-(x)
Sugared notation:
obj - x
3, *
Definition:
def *(x)
Calling:
obj.*(x)
Sugared notation:
obj * x
4,/
Definition:
def /(x)
Calling:
obj./(x)
Sugared notation:
obj / x
5, %
Definition:
def %(x)
Calling:
obj.%(x)
Sugared notation:
obj % x
6, []
Definition:
def [](x)
Calling:
obj.[](x)
Sugared notation:
obj[x]
7, []=
Definition:
def []=(x, y)
Calling:
obj.[]=(x, y)
Sugared notation:
obj[x] = y
8, <<
Definition:
def <<(x)
Calling:
obj.<<(x)
Sugared notation:
obj << x
9, ==
Definition:
def ==(x)
Calling:
obj.==(x)
Sugared notation:
obj == x
10, >
Definition:
def >(x)
Calling:
obj.>(x)
Sugared notation:
obj > x
11, <
Definition:
def <(x)
Calling:
obj.<(x)
Sugared notation:
obj < x
12, >=
Definition:
def >=(x)
Calling:
obj.>=(x)
Sugared notation:
obj >= x
13, <=
Definition:
def <=(x)
Calling:
obj.<=(x)
Sugared notation:
obj <= x
14, ===
Definition:
def ===(x)
Calling:
obj.===(x)
Sugared notation:
obj === x