Class: LibRubyParser::Nodes::SClass
- Inherits:
-
LibRubyParser::Node
- Object
- LibRubyParser::Node
- LibRubyParser::Nodes::SClass
- Defined in:
- lib/lib-ruby-parser/nodes.rb
Overview
Represents opening a singleton class (i.e. class << foo; ... end;
)
Instance Attribute Summary collapse
-
#body ⇒ Node?
readonly
Body of the block.
-
#end_l ⇒ Loc
readonly
Location of the
end
keyword. -
#expr ⇒ Node
readonly
Expression that is used to get a singleton class.
-
#expression_l ⇒ Loc
readonly
Location of the full expression.
-
#keyword_l ⇒ Loc
readonly
Location of the
class
keyword. -
#operator_l ⇒ Loc
readonly
Location of the
<<
operator.
Instance Attribute Details
#body ⇒ Node? (readonly)
Body of the block
3677 3678 3679 |
# File 'lib/lib-ruby-parser/nodes.rb', line 3677 def body @body end |
#end_l ⇒ Loc (readonly)
Location of the end
keyword
class << foo; end
~~~
3704 3705 3706 |
# File 'lib/lib-ruby-parser/nodes.rb', line 3704 def end_l @end_l end |
#expr ⇒ Node (readonly)
Expression that is used to get a singleton class
Lvar("foo")
for class << foo; end
3673 3674 3675 |
# File 'lib/lib-ruby-parser/nodes.rb', line 3673 def expr @expr end |
#expression_l ⇒ Loc (readonly)
Location of the full expression
class << foo; end
~~~~~~~~~~~~~~~~~
3713 3714 3715 |
# File 'lib/lib-ruby-parser/nodes.rb', line 3713 def expression_l @expression_l end |
#keyword_l ⇒ Loc (readonly)
Location of the class
keyword
class << foo; end
~~~~~
3686 3687 3688 |
# File 'lib/lib-ruby-parser/nodes.rb', line 3686 def keyword_l @keyword_l end |
#operator_l ⇒ Loc (readonly)
Location of the <<
operator
class << foo; end
~~
3695 3696 3697 |
# File 'lib/lib-ruby-parser/nodes.rb', line 3695 def operator_l @operator_l end |