Class: LibRubyParser::Nodes::IfGuard
- Inherits:
-
LibRubyParser::Node
- Object
- LibRubyParser::Node
- LibRubyParser::Nodes::IfGuard
- Defined in:
- lib/lib-ruby-parser/nodes.rb
Overview
Represents an if
guard used in pattern matching (i.e. case foo; in pattern if guard; end
)
Instance Attribute Summary collapse
-
#cond ⇒ Node
readonly
Condition of the guard,
Lvar("foo")
inin pattern if guard
. -
#expression_l ⇒ Loc
readonly
Location of the full expression.
-
#keyword_l ⇒ Loc
readonly
Location of the
if
keyword.
Instance Attribute Details
#cond ⇒ Node (readonly)
Condition of the guard, Lvar("foo")
in in pattern if guard
1852 1853 1854 |
# File 'lib/lib-ruby-parser/nodes.rb', line 1852 def cond @cond end |
#expression_l ⇒ Loc (readonly)
Location of the full expression
case foo; in pattern if cond; end
~~~~~~~
1870 1871 1872 |
# File 'lib/lib-ruby-parser/nodes.rb', line 1870 def expression_l @expression_l end |
#keyword_l ⇒ Loc (readonly)
Location of the if
keyword
case foo; in pattern if cond; end
~~
1861 1862 1863 |
# File 'lib/lib-ruby-parser/nodes.rb', line 1861 def keyword_l @keyword_l end |