Module: Carbon::Core::Integer Private
- Defined in:
- lib/carbon/core/integer.rb,
lib/carbon/core/integer/cast.rb,
lib/carbon/core/integer/math.rb,
lib/carbon/core/integer/misc.rb,
lib/carbon/core/integer/pole.rb,
lib/carbon/core/integer/ship.rb,
lib/carbon/core/integer/sign.rb,
lib/carbon/core/integer/type.rb,
lib/carbon/core/integer/zero.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Manages all Integer definitions for the Core library. This includes all nine (9) types and all 1298 integer functions.
Defined Under Namespace
Modules: Cast, Math, Misc, Pole, Ship, Sign, Type, Zero
Constant Summary
Constants included from Math
Math::COMP_OPERATIONS, Math::COMP_OPERATIONS_MAP, Math::MATH_OPERATIONS
Class Method Summary collapse
-
.define_integer ⇒ self
private
Defines all integer definitions on the Core library.
-
.define_integer_functions ⇒ void
private
Defines all integer functions on the Core library.
Methods included from Cast
Methods included from Math
define_comp_function, define_comp_functions, define_math_function, define_math_functions
Methods included from Misc
define_bool_function, define_iabs_function, define_next_function, define_null_function, define_prev_function, define_size_function
Methods included from Pole
define_even_function, define_negative_function, define_odd_function, define_positive_function
Methods included from Ship
Methods included from Sign
define_sign_function, define_sign_functions
Methods included from Type
define_integer_type, define_integer_types
Methods included from Zero
define_nonzero_function, define_zero_function
Class Method Details
.define_integer ⇒ self
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Defines all integer definitions on the Core library. This just calls define_integer_types and define_integer_functions.
37 38 39 40 41 |
# File 'lib/carbon/core/integer.rb', line 37 def define_integer define_integer_types define_integer_functions self end |
.define_integer_functions ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Defines all integer functions on the Core library.
62 63 64 65 66 67 68 69 |
# File 'lib/carbon/core/integer.rb', line 62 def define_integer_functions performed = Set.new Ints.product(Ints).each do |(first, second)| define_integer_functions_pair(first, second) define_integer_functions_one(first) unless performed.include?(first) performed << first end end |