Sha256: 56ab688e8676a3fe3c390823464cf2dc738b68743a0ecd56c6a66b9fdedc71ad
Contents?: true
Size: 403 Bytes
Versions: 25
Compression:
Stored size: 403 Bytes
Contents
module RubyVersionHelpers RUBY_2_4 = Gem::Version.new('2.4.0') CURRENT_RUBY = Gem::Version.new(RUBY_VERSION) def numeric_type if CURRENT_RUBY < RUBY_2_4 Fixnum else Integer end end module_function :numeric_type def a_numeric type = numeric_type if type == Integer "an #{type}" else "a #{type}" end end module_function :a_numeric end
Version data entries
25 entries across 25 versions & 1 rubygems