class YARD::Handlers::Ruby::ConstantHandler

def extract_parameters(superclass)

Returns:
  • (Array) - the member names to generate methods for

Parameters:
  • superclass (MethodCallNode) -- the AST node for the Struct.new call
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