Class: Inch::CLI::Command::BaseObject Abstract
- Defined in:
- lib/inch/cli/command/base_object.rb
Overview
This class is abstract.
Base class for Command objects concerned with clearly specified objects.
Commands subclassing from this class are called with a list of object names (most commonly only one) in the form:
$ inch COMMAND [paths] OBJECT_NAME [, OBJECT_NAME2, ...] [options]
Direct Known Subclasses
Console, Inspect, Options::Console, Options::Diff, Options::Inspect, Options::Show, Show
Instance Attribute Summary collapse
-
#object ⇒ Object
Returns the value of attribute object.
Attributes inherited from BaseList
Attributes inherited from Base
Instance Method Summary collapse
-
#prepare_objects(*args) ⇒ void
Prepares the given objects, parsing arguments and running the source parser.
Methods inherited from BaseList
Methods inherited from Base
#description, #initialize, #name, register_command_as, run, #run, #usage
Methods included from TraceHelper
Constructor Details
This class inherits a constructor from Inch::CLI::Command::Base
Instance Attribute Details
#object ⇒ Object
Returns the value of attribute object.
14 15 16 |
# File 'lib/inch/cli/command/base_object.rb', line 14 def object @object end |
Instance Method Details
#prepare_objects(*args) ⇒ void
This method returns an undefined value.
Prepares the given objects, parsing arguments and running the source parser.
21 22 23 24 25 26 27 |
# File 'lib/inch/cli/command/base_object.rb', line 21 def prepare_objects(*args) prepare_codebase(*args) context = API::Get.new(codebase, @options.object_names) self.objects = context.objects self.object = context.object end |