class RedParse::ListInNode::RescueHeaderNode

Public Class Methods

new(rescueword,arrowword,exceptions,thenword) click to toggle source
Calls superclass method RedParse::ListInNode::Node::new
# File lib/redparse/node.rb, line 5196
      def initialize(rescueword,arrowword,exceptions,thenword)
        @offset=rescueword.offset
        case exceptions
        when nil
        when VarNode
          if arrowword
            exvarname=exceptions
            exceptions=nil
            arrowword=nil
          end
        when ArrowOpNode
          exvarname=exceptions.last
          exceptions=exceptions.first
        when CommaOpNode
          lastexpr=exceptions.last
          if ArrowOpNode===lastexpr
            exceptions[-1]=lastexpr.left
            exvarname=lastexpr.right
          end
          exceptions=Array.new(exceptions)
        end
        fail if arrowword
#        fail unless VarNode===exvarname || exvarname.nil?
        super(exceptions,exvarname)
      end

Public Instance Methods

image() click to toggle source
# File lib/redparse/node.rb, line 5222
def image; "(rescue=>)" end