Class: LibRubyParser::Nodes::Defined

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

Overview

Represents a defined?(foo) expression

Instance Attribute Summary collapse

Instance Attribute Details

#begin_lLoc? (readonly)

Location of the open parenthesis

defined?(foo)
        ~

None if there are no parentheses

Returns:



1092
1093
1094
# File 'lib/lib-ruby-parser/nodes.rb', line 1092

def begin_l
  @begin_l
end

#end_lLoc? (readonly)

Location of the closing parenthesis

defined?(foo)
            ~

None if there are no parentheses

Returns:



1103
1104
1105
# File 'lib/lib-ruby-parser/nodes.rb', line 1103

def end_l
  @end_l
end

#expression_lLoc (readonly)

Location of the full expression

defined?(foo)
~~~~~~~~~~~~~

Returns:



1112
1113
1114
# File 'lib/lib-ruby-parser/nodes.rb', line 1112

def expression_l
  @expression_l
end

#keyword_lLoc (readonly)

Location of the defined? keyword

defined?(foo)
~~~~~~~~

Returns:



1081
1082
1083
# File 'lib/lib-ruby-parser/nodes.rb', line 1081

def keyword_l
  @keyword_l
end

#valueNode (readonly)

Value given to defined?

Returns:



1072
1073
1074
# File 'lib/lib-ruby-parser/nodes.rb', line 1072

def value
  @value
end