Class: SfCli::Sf::Main
- Inherits:
-
Object
- Object
- SfCli::Sf::Main
- Includes:
- Singleton
- Defined in:
- lib/sf_cli/sf/main.rb
Overview
The entry class of sf command. It is returned by the sf method. With including Singleton module, the instance of this class is guaranteed as singleton.
Constant Summary collapse
- OPERATION_CATEGORIES =
%w[Org Sobject Data Project Apex]
Instance Method Summary collapse
-
#initialize ⇒ Main
constructor
Generate each sub command object such as org, data and sobject so that it can chain like ‘sf.org.display`.
Constructor Details
#initialize ⇒ Main
Generate each sub command object such as org, data and sobject so that it can chain like ‘sf.org.display`.
28 29 30 31 32 |
# File 'lib/sf_cli/sf/main.rb', line 28 def initialize OPERATION_CATEGORIES.each do |category| instance_variable_set(:"@#{category.downcase}", Object.const_get(%|::SfCli::Sf::#{category}::Core|).new) end end |