Module: Integer::Base::StringPrepender

Defined in:
lib/integer/base/refinementable.rb

Instance Method Summary collapse

Instance Method Details

#to_i(base = 10) ⇒ Integer

Parameters:

  • base_number (Fixnum)

    Delegate to standard to_i

  • positional_chars (Array<Symbol, String, #to_sym>)

Returns:


9
10
11
12
13
14
15
16
# File 'lib/integer/base/refinementable.rb', line 9

def to_i(base=10)
  case base
  when Enumerable
    ::Integer::Base.parse self, base
  else
    super base
  end
end