RescueMod
represents the use of the modifier form of a rescue
clause.
expression rescue valueAttributes
Node
the expression to execute
Node
the value to use if the executed expression raises an error
def initialize(statement:, value:, location:) @statement = statement @value = value @location = location @comments = [] endPublic Instance Methods Source
def ===(other) other.is_a?(RescueMod) && statement === other.statement && value === other.value endSource
def accept(visitor) visitor.visit_rescue_mod(self) endSource
def child_nodes [statement, value] endSource
def copy(statement: nil, value: nil, location: nil) node = RescueMod.new( statement: statement || self.statement, value: value || self.value, location: location || self.location ) node.comments.concat(comments.map(&:copy)) node endSource
def deconstruct_keys(_keys) { statement: statement, value: value, location: location, comments: comments } endSource
def format(q) q.text("begin") q.group do q.indent do q.breakable_force q.format(statement) end q.breakable_force q.text("rescue StandardError") q.indent do q.breakable_force q.format(value) end q.breakable_force end q.text("end") end
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4