Class: Expectacle::ThrowerBase
- Inherits:
-
Object
- Object
- Expectacle::ThrowerBase
- Defined in:
- lib/expectacle/thrower_base.rb,
lib/expectacle/thrower_base_io.rb,
lib/expectacle/thrower_base_params.rb
Overview
Basic state setup/management
Direct Known Subclasses
Instance Attribute Summary collapse
-
#base_dir ⇒ String
readonly
Base directory path to find params/hosts/commands file.
-
#logger ⇒ Logger
Logger instance.
Instance Method Summary collapse
-
#commands_dir ⇒ String
Path to command list file directory.
-
#hosts_dir ⇒ String
Path to host list file directory.
-
#initialize(timeout: 60, verbose: true, base_dir: Dir.pwd, logger: $stdout) ⇒ Expectacle::ThrowerBase
constructor
Constructor.
-
#opts_dir ⇒ String
Path to span command options file directory.
-
#prompts_dir ⇒ String
Path to prompt file directory.
Constructor Details
#initialize(timeout: 60, verbose: true, base_dir: Dir.pwd, logger: $stdout) ⇒ Expectacle::ThrowerBase
Constructor
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/expectacle/thrower_base.rb', line 23 def initialize(timeout: 60, verbose: true, base_dir: Dir.pwd, logger: $stdout) # default @host_param = {} # remote connection timeout (sec) @timeout = timeout # cli mode flag @enable_mode = false # debug (use debug print to stdout) $expect_verbose = verbose # base dir @base_dir = File.(base_dir) # logger setup_default_logger(logger) end |
Instance Attribute Details
#base_dir ⇒ String (readonly)
Returns Base directory path to find params/hosts/commands file.
12 13 14 |
# File 'lib/expectacle/thrower_base.rb', line 12 def base_dir @base_dir end |
#logger ⇒ Logger
Returns Logger instance.
11 12 13 |
# File 'lib/expectacle/thrower_base_io.rb', line 11 def logger @logger end |
Instance Method Details
#commands_dir ⇒ String
Path to command list file directory.
53 54 55 |
# File 'lib/expectacle/thrower_base.rb', line 53 def commands_dir File.join @base_dir, 'commands' end |
#hosts_dir ⇒ String
Path to host list file directory.
47 48 49 |
# File 'lib/expectacle/thrower_base.rb', line 47 def hosts_dir File.join @base_dir, 'hosts' end |
#opts_dir ⇒ String
Path to span command options file directory.
59 60 61 |
# File 'lib/expectacle/thrower_base.rb', line 59 def opts_dir File.join @base_dir, 'opts' end |
#prompts_dir ⇒ String
Path to prompt file directory.
41 42 43 |
# File 'lib/expectacle/thrower_base.rb', line 41 def prompts_dir File.join @base_dir, 'prompts' end |