class RedParse::ListInNode::BlockParams
Public Class Methods
new(data)
click to toggle source
Calls superclass method
RedParse::ListInNode::AssigneeList::new
# File lib/redparse/node.rb, line 2759 def initialize(data) item=data.first if data.size==1 #elide 1 layer of parens if present if ParenedNode===item item=item.first data=CommaOpNode===item ? Array.new(item) : [item] @had_parens=true end data= Array.new(data) if CommaOpNode===data super(data) unless data.empty? end
Public Instance Methods
parsetree(o)
click to toggle source
Calls superclass method
RedParse::ListInNode::AssigneeList#parsetree
# File lib/redparse/node.rb, line 2780 def parsetree o result=super result.push nil if UnaryStarNode===self.last || size>1 #and o[:ruby187] result end
unparse(o=default_unparse_options)
click to toggle source
Calls superclass method
RedParse::ListInNode::AssigneeList#unparse
# File lib/redparse/node.rb, line 2772 def unparse o=default_unparse_options if defined? @had_parens "|("+super+")|" else "|"+super+"|" end end