Class: Prism::RationalNode
Instance Method Summary collapse
-
#value ⇒ Object
Returns the value of the node as a Ruby Rational.
Instance Method Details
#value ⇒ Object
Returns the value of the node as a Ruby Rational.
83 84 85 |
# File 'lib/prism/node_ext.rb', line 83 def value Rational(numeric.is_a?(IntegerNode) ? numeric.value : slice.chomp("r")) end |