Class: Mingle::ParsedNumber

Inherits:
BitGirderClass
  • Object
show all
Extended by:
Forwardable
Includes:
StringParser
Defined in:
lib/mingle.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from StringParser

included

Class Method Details

.impl_parse(s) ⇒ Object



1723
1724
1725
# File 'lib/mingle.rb', line 1723

def self.impl_parse( s )
    MingleParser.consume_string( s ) { |p| p.expect_number }
end

Instance Method Details

#external_formObject



1719
1720
1721
# File 'lib/mingle.rb', line 1719

def external_form
    ( @negative ? "-" : "" ) << @num.external_form
end

#hashObject



1714
1715
1716
# File 'lib/mingle.rb', line 1714

def hash
    [ @negative, @num ].hash
end