Command
represents a method call with arguments and no parentheses. Note that Command
nodes only happen when there is no explicit receiver for this method.
method argumentAttributes
Args
the arguments being sent with the message
BlockNode
the optional block being passed to the method
Const
| Ident
the message being sent to the implicit receiver
def initialize(message:, arguments:, block:, location:) @message = message @arguments = arguments @block = block @location = location @comments = [] endPublic Instance Methods Source
def ===(other) other.is_a?(Command) && message === other.message && arguments === other.arguments && block === other.block endSource
def accept(visitor) visitor.visit_command(self) endSource
def arity arguments.arity endSource
def child_nodes [message, arguments, block] endSource
def copy(message: nil, arguments: nil, block: nil, location: nil) node = Command.new( message: message || self.message, arguments: arguments || self.arguments, block: block || self.block, location: location || self.location ) node.comments.concat(comments.map(&:copy)) node endSource
def deconstruct_keys(_keys) { message: message, arguments: arguments, block: block, location: location, comments: comments } endSource
def format(q) q.group do q.format(message) align(q, self) { q.format(arguments) } end q.format(block) if block 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