Module: Inch::API

Defined in:
lib/inch/api.rb,
lib/inch/api/get.rb,
lib/inch/api/list.rb,
lib/inch/api/diff.rb,
lib/inch/api/stats.rb,
lib/inch/api/filter.rb,
lib/inch/api/suggest.rb,
lib/inch/api/options/base.rb,
lib/inch/api/options/filter.rb,
lib/inch/api/options/suggest.rb,
lib/inch/api/compare/codebases.rb,
lib/inch/api/compare/code_objects.rb

Overview

The API module is the entry point for Inch's APIs

APIs are kind of “use cases” that are utilized by the CLI classes to actually “do things”.

Example:

$ inch list lib/**/*.rb --private

This basically calls something like this:

codebase = Codebase::Proxy.new(Dir.pwd, ["lib/**/*.rb"], [])
options = {:visibility => [:public, :protected, :private]}
context = API::List.new(codebase, options)
context.objects # => Array

The List API takes a Codebase::Proxy object and an options hash or a class in API::Options and returns objects and grade_lists matching that options.

Defined Under Namespace

Modules: Compare, Options Classes: Diff, Filter, Get, List, Stats, Suggest