Class: BranchIOCLI::Configuration::EnvConfiguration

Inherits:
Configuration
  • Object
show all
Defined in:
lib/branch_io_cli/configuration/env_configuration.rb

Instance Attribute Summary

Attributes inherited from Configuration

#apps, #cartfile_path, #keys, #options, #pod_repo_update, #podfile, #podfile_path, #quiet, #sdk, #sdk_integration_mode, #target, #workspace, #workspace_path, #xcodeproj, #xcodeproj_path

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Configuration

absolute_path, #absolute_path, #all_xcodeproj_paths, #app_delegate_objc_path, #app_delegate_swift_path, available_options, #branch_imports, #branch_imports_from_file, #bridging_header_path, #bridging_header_required?, #confirm_with_user, defaults, #find_project, #helper, #ios_urischemes_from_api, #key_valid?, #messages_view_controller_path, #method_missing, #modules_enabled?, open_podfile, #open_podfile, open_xcodeproj, #open_xcodeproj, #pod_install_required?, #print_identification, #prompt_for_option, #relative_path, relative_path, #root, root, #swift_version, #target_name, uri_scheme_without_suffix, #uses_frameworks?, #validate_buildfile_at_path, #validate_buildfile_path, #validate_key, #validate_keys, #validate_options, #validate_target, #validate_xcodeproj_path, wrapper

Constructor Details

#initialize(options) ⇒ EnvConfiguration

Returns a new instance of EnvConfiguration.



17
18
19
20
21
22
23
24
25
26
# File 'lib/branch_io_cli/configuration/env_configuration.rb', line 17

def initialize(options)
  @quiet = !options.verbose
  @ruby_version = options.ruby_version
  @rubygems_version = options.rubygems_version
  @lib_path = options.lib_path
  @assets_path = options.assets_path
  @completion_script = options.completion_script
  @shell = options.shell
  super
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class BranchIOCLI::Configuration::Configuration

Class Method Details

.examplesObject



9
10
11
12
13
14
# File 'lib/branch_io_cli/configuration/env_configuration.rb', line 9

def examples
  {
    "Show CLI environment" => "br env",
    "Get completion script for zsh" => "br env -cs zsh"
  }
end

.summaryObject



5
6
7
# File 'lib/branch_io_cli/configuration/env_configuration.rb', line 5

def summary
  "Output information about CLI environment."
end

Instance Method Details

#logObject



28
29
30
31
32
33
34
35
36
# File 'lib/branch_io_cli/configuration/env_configuration.rb', line 28

def log
  super
  return if quiet

  say <<EOF
<%= color('Show completion script:', BOLD) %> #{completion_script}
<%= color('Shell for completion script:', BOLD) %> #{shell}
EOF
end

#show_all?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/branch_io_cli/configuration/env_configuration.rb', line 38

def show_all?
  !show_completion_script?
end

#show_completion_script?Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/branch_io_cli/configuration/env_configuration.rb', line 42

def show_completion_script?
  completion_script
end