class Pry::Command::Stat - pry-0.10.1 Documentation

# class Pry::Command::Stat

### Public Instance Methods

options(opt) click to toggle source

    # File lib/pry/commands/stat.rb, line 16
    def options(opt)
      method_options(opt)
    end

process() click to toggle source

    # File lib/pry/commands/stat.rb, line 20
    def process
      meth = method_object
      aliases = meth.aliases

      output.puts unindent <<-EOS
        Method Information:
        --
        Name: #{meth.name}
        Alias#{ "es" if aliases.length > 1 }: #{ aliases.any? ? aliases.join(", ") : "None." }
        Owner: #{meth.owner ? meth.owner : "Unknown"}
        Visibility: #{meth.visibility}
        Type: #{meth.is_a?(::Method) ? "Bound" : "Unbound"}
        Arity: #{meth.arity}
        Method Signature: #{meth.signature}
        Source Location: #{meth.source_location ? meth.source_location.join(":") : "Not found."}
      EOS
    end