Class: Numeric

Inherits:
Object
  • Object
show all
Includes:
Everythingrb::InspectQuotable
Defined in:
lib/everythingrb/numeric.rb

Overview

Extensions to Ruby’s core Numeric class and subclasses

Provides:

  • #in_quotes, #with_quotes: Wrap numeric values in quotes

Examples:

require "everythingrb/numeric"

42.in_quotes      # => "\"42\""
3.14.in_quotes    # => "\"3.14\""
(1+2i).in_quotes  # => "\"1+2i\""

Method Summary

Methods included from Everythingrb::InspectQuotable

#in_quotes