lib/yard/lib/yard/handlers/ruby/constant_handler.rb
# Extract the parameters from the Struct.new AST node, returning them as a list
# of strings
#
# @param [MethodCallNode] superclass the AST node for the Struct.new call
# @return [Array<String>] the member names to generate methods for
Extract the parameters from the Struct.new AST node, returning them as a list
of strings
Extract the parameters from the Struct . new AST node returning them as a list of strings
def extract_parameters(superclass)
    return [] unless superclass.parameters
    members = superclass.parameters.select {|x| x && x.type == :symbol_literal}
    members.map! {|x| x.source.strip[1..-1]}
    members
  end
def extract_parameters ( superclass ) return [ ] unless superclass . parameters members = superclass . parameters . select { | x | x && x . type == :symbol_literal } members . map! { | x | x . source . strip [ 1 .. - 1 ] } members end
Extract the parameters from the Struct.new AST node, returning them as a list
of strings
Extract the parameters from the Struct . new AST node returning them as a list of strings
the member names to generate methods for
the member names to generate methods for
Array<String>
superclass
superclass the AST node for the Struct.new call
superclass the AST node for the Struct . new call