lib/docrb/lib/docrb/ruby_parser.rb
# Generates metadata for a given class, such as its name, arguments,
# and boundaries.
#
# node - Class node being processed
#
# Returns a Hash containing metadata about the provided class.
Generates metadata for a given class, such as its name, arguments,
and boundaries.

Class node being processed

Returns a Hash containing metadata about the provided class.
Generates metadata for a given class such as its name arguments and boundaries . Class node being processed Returns a Hash containing metadata about the provided class .
def class_to_meta(node)
      class_path, name = parse_class_path(node.children.first)
      {
        type: :class,
        name: name,
        class_path: class_path,
        start_at: node.loc.keyword.line,
        end_at: node.loc.end.line,
        _visibility: :public
      }.tap do |h|
        if (inherits = node.children[1])
          h[:inherits] = inherits.children.last
        end
      end
    end
def class_to_meta ( node ) class_path , name = parse_class_path ( node . children . first ) { type : :class , name : name , class_path : class_path , start_at : node . loc . keyword . line , end_at : node . loc . end . line , _visibility : :public } . tap do | h | if ( inherits = node . children [ 1 ] ) h [ :inherits ] = inherits . children . last end end end
Generates metadata for a given class, such as its name, arguments,
and boundaries.
Generates metadata for a given class such as its name arguments and boundaries .
node