class SyntaxTree::Unary
Experimental RBS support (using type sampling data from the type_fusion project).
# sig/syntax_tree/node.rbs class SyntaxTree::Unary < SyntaxTree::Node def accept: (Visitor visitor) -> untyped def child_nodes: () -> untyped def initialize: (operator: String, statement: SyntaxTree::Int, location: SyntaxTree::Location) -> void end
!value
+~+.
Unary represents a unary method being called on an expression, as in +!+ or
def ===(other)
def ===(other) other.is_a?(Unary) && operator === other.operator && statement === other.statement end
def accept(visitor)
Experimental RBS support (using type sampling data from the type_fusion project).
def accept: (Visitor visitor) -> untyped
This signature was generated using 3 samples from 1 application.
def accept(visitor) visitor.visit_unary(self) end
def child_nodes
Experimental RBS support (using type sampling data from the type_fusion project).
def child_nodes: () -> untyped
This signature was generated using 3 samples from 1 application.
def child_nodes [statement] end
def copy(operator: nil, statement: nil, location: nil)
def copy(operator: nil, statement: nil, location: nil) node = Unary.new( operator: operator || self.operator, statement: statement || self.statement, location: location || self.location ) node.comments.concat(comments.map(&:copy)) node end
def deconstruct_keys(_keys)
def deconstruct_keys(_keys) { operator: operator, statement: statement, location: location, comments: comments } end
def format(q)
def format(q) q.text(operator) q.format(statement) end
def initialize(operator:, statement:, location:)
Experimental RBS support (using type sampling data from the type_fusion project).
def initialize: (operator: String, statement: SyntaxTree::Int, location: SyntaxTree::Location) -> void
This signature was generated using 1 sample from 1 application.
def initialize(operator:, statement:, location:) @operator = operator @statement = statement @location = location @comments = [] end