Module: Rbsiev::Primitives::Arithmetic
- Included in:
- Rbsiev::Primitives
- Defined in:
- lib/rbsiev/primitives/arithmetic.rb
Instance Method Summary collapse
- #add(*args) ⇒ Object
- #div(*args) ⇒ Object
- #mod(*args) ⇒ Object
- #mul(*args) ⇒ Object
- #subtract(*args) ⇒ Object
- #zero?(obj) ⇒ Boolean
Instance Method Details
#add(*args) ⇒ Object
17 18 19 |
# File 'lib/rbsiev/primitives/arithmetic.rb', line 17 def add(*args) a_calc(:+, *args) end |
#div(*args) ⇒ Object
29 30 31 |
# File 'lib/rbsiev/primitives/arithmetic.rb', line 29 def div(*args) a_calc(:/, *args) end |
#mod(*args) ⇒ Object
33 34 35 |
# File 'lib/rbsiev/primitives/arithmetic.rb', line 33 def mod(*args) a_calc(:%, *args) end |
#mul(*args) ⇒ Object
25 26 27 |
# File 'lib/rbsiev/primitives/arithmetic.rb', line 25 def mul(*args) a_calc(:*, *args) end |
#subtract(*args) ⇒ Object
21 22 23 |
# File 'lib/rbsiev/primitives/arithmetic.rb', line 21 def subtract(*args) a_calc(:-, *args) end |