Class: MiniRuby::AST::TrueLiteralNode

Inherits:
ExpressionNode show all
Defined in:
lib/miniruby/ast.rb

Overview

Represents a true literal eg. ‘true`

Instance Attribute Summary

Attributes inherited from Node

#span

Instance Method Summary collapse

Methods inherited from Node

#==, #initialize

Constructor Details

This class inherits a constructor from MiniRuby::AST::Node

Instance Method Details

#inspect(indent = 0) ⇒ Object

: (?Integer indent) -> String



815
816
817
# File 'lib/miniruby/ast.rb', line 815

def inspect(indent = 0)
  "#{INDENT_UNIT * indent}true"
end

#to_s(indent = 0) ⇒ Object

: (?Integer indent) -> String



809
810
811
# File 'lib/miniruby/ast.rb', line 809

def to_s(indent = 0)
  "#{INDENT_UNIT * indent}true"
end