Module: Nuggets::Integer::LengthMixin
- Included in:
- Integer
- Defined in:
- lib/nuggets/integer/length_mixin.rb
Instance Method Summary collapse
-
#digit_count ⇒ Object
call-seq: int.digit_count => anInteger.
-
#length ⇒ Object
call-seq: int.length => anInteger.
Instance Method Details
#digit_count ⇒ Object
call-seq:
int.digit_count => anInteger
Returns the digit count of int. [ruby-core:22383]
43 44 45 |
# File 'lib/nuggets/integer/length_mixin.rb', line 43 def digit_count abs.length end |
#length ⇒ Object
call-seq:
int.length => anInteger
Returns the length of int.
35 36 37 |
# File 'lib/nuggets/integer/length_mixin.rb', line 35 def length to_s.length end |