Class: Fixnum
Overview
Some methods of Fixnum
are modified
Instance Method Summary collapse
-
#intand_with_hornetseye(other) ⇒ Object
& is modified to work with this library.
-
#intor_with_hornetseye(other) ⇒ Object
| is modified to work with this library.
-
#intxor_with_hornetseye(other) ⇒ Object
^ is modified to work with this library.
- #power_with_hornetseye(other) ⇒ Object
- #power_with_rgb(other) ⇒ Object
-
#shl_with_hornetseye(other) ⇒ Object
<< is modified to work with this library.
-
#shr_with_hornetseye(other) ⇒ Object
>> is modified to work with this library.
Instance Method Details
#intand_with_hornetseye(other) ⇒ Object
& is modified to work with this library
314 315 316 317 318 319 320 321 |
# File 'lib/multiarray.rb', line 314 def intand_with_hornetseye( other ) if other.is_a? Integer intand_without_hornetseye other else x, y = other.coerce self x & y end end |
#intor_with_hornetseye(other) ⇒ Object
| is modified to work with this library
328 329 330 331 332 333 334 335 |
# File 'lib/multiarray.rb', line 328 def intor_with_hornetseye( other ) if other.is_a? Integer intor_without_hornetseye other else x, y = other.coerce self x | y end end |
#intxor_with_hornetseye(other) ⇒ Object
^ is modified to work with this library
342 343 344 345 346 347 348 349 |
# File 'lib/multiarray.rb', line 342 def intxor_with_hornetseye( other ) if other.is_a? Integer intxor_without_hornetseye other else x, y = other.coerce self x ^ y end end |
#power_with_hornetseye(other) ⇒ Object
383 384 385 386 387 388 389 390 |
# File 'lib/multiarray.rb', line 383 def power_with_hornetseye( other ) if other.is_a? Hornetseye::Node x, y = other.coerce self x ** y else power_without_hornetseye other end end |
#power_with_rgb(other) ⇒ Object
711 712 713 714 715 716 717 718 |
# File 'lib/multiarray/rgb.rb', line 711 def power_with_rgb( other ) if other.is_a? Hornetseye::RGB x, y = other.coerce self x ** y else power_without_rgb other end end |
#shl_with_hornetseye(other) ⇒ Object
<< is modified to work with this library
356 357 358 359 360 361 362 363 |
# File 'lib/multiarray.rb', line 356 def shl_with_hornetseye( other ) if other.is_a? Integer shl_without_hornetseye other else x, y = other.coerce self x << y end end |
#shr_with_hornetseye(other) ⇒ Object
>> is modified to work with this library
370 371 372 373 374 375 376 377 |
# File 'lib/multiarray.rb', line 370 def shr_with_hornetseye( other ) if other.is_a? Integer shr_without_hornetseye other else x, y = other.coerce self x >> y end end |