Sha256: 03de0f80b4d42286f9ddc2b9b162d7e542497959eb535d5d4cccf953bc134b90

Contents?: true

Size: 264 Bytes

Versions: 3

Compression:

Stored size: 264 Bytes

Contents

# frozen_string_literal: true

module Basic101

  class NumericIdentifier < Identifier

    def input(input_reader)
      value = input_reader.read_numeric
      BasicFloat.new(value).simplest
    end

    def default
      BasicInteger.new(0)
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
basic101-1.0.2 lib/basic101/numeric_identifier.rb
basic101-1.0.1 lib/basic101/numeric_identifier.rb
basic101-1.0.0 lib/basic101/numeric_identifier.rb