Class: SfCli::Sf::Main

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/sf_cli/sf/main.rb

Overview

description

The entry class of sf command. It is returned by sf method. With including Singleton module, the instance of this class is guaranteed as singleton.

examples

sf             # returns a instance of SfCli::Sf
sf.org.display # you can follow the similar syntax to the original command by using method chain.

Constant Summary collapse

OPERATION_CATEGORIES =
%w[Org Sobject Data Project]

Instance Method Summary collapse

Constructor Details

#initializeMain

Returns a new instance of Main.



24
25
26
27
28
# File 'lib/sf_cli/sf/main.rb', line 24

def initialize
  OPERATION_CATEGORIES.each do |category|
    instance_variable_set(:"@#{category.downcase}", Object.const_get(%|::SfCli::Sf::#{category}::Core|).new)
  end
end