123456789_123456789_123456789_123456789_123456789_

Class: Prism::RationalNode

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Node
Instance Chain:
self, Node
Inherits: Prism::Node
Defined in: lib/prism/node_ext.rb

Instance Attribute Summary

Node - Inherited

#newline_flag?

: () -> bool.

Instance Method Summary

  • #value

    Returns the value of the node as a Ruby Rational.

Node - Inherited

#deprecated

: (*String replacements) -> void.

#newline_flag!

: (Array lines) -> void.

Instance Method Details

#value

Returns the value of the node as a Ruby Rational.

[ GitHub ]

  
# File 'lib/prism/node_ext.rb', line 176

def value
  Rational(numerator, denominator)
end