Class: LibRubyParser::Nodes::SClass

Inherits:
LibRubyParser::Node show all
Defined in:
lib/lib-ruby-parser/nodes.rb

Overview

Represents opening a singleton class (i.e. class << foo; ... end;)

Instance Attribute Summary collapse

Instance Attribute Details

#bodyNode? (readonly)

Body of the block

Returns:



3677
3678
3679
# File 'lib/lib-ruby-parser/nodes.rb', line 3677

def body
  @body
end

#end_lLoc (readonly)

Location of the end keyword

class << foo; end
              ~~~

Returns:



3704
3705
3706
# File 'lib/lib-ruby-parser/nodes.rb', line 3704

def end_l
  @end_l
end

#exprNode (readonly)

Expression that is used to get a singleton class

Lvar("foo") for class << foo; end

Returns:



3673
3674
3675
# File 'lib/lib-ruby-parser/nodes.rb', line 3673

def expr
  @expr
end

#expression_lLoc (readonly)

Location of the full expression

class << foo; end
~~~~~~~~~~~~~~~~~

Returns:



3713
3714
3715
# File 'lib/lib-ruby-parser/nodes.rb', line 3713

def expression_l
  @expression_l
end

#keyword_lLoc (readonly)

Location of the class keyword

class << foo; end
~~~~~

Returns:



3686
3687
3688
# File 'lib/lib-ruby-parser/nodes.rb', line 3686

def keyword_l
  @keyword_l
end

#operator_lLoc (readonly)

Location of the << operator

class << foo; end
      ~~

Returns:



3695
3696
3697
# File 'lib/lib-ruby-parser/nodes.rb', line 3695

def operator_l
  @operator_l
end