Class: Expectacle::ThrowerBase
- Inherits:
-
Object
- Object
- Expectacle::ThrowerBase
- Defined in:
- lib/expectacle/thrower_base.rb
Overview
Basic state setup/management
Direct Known Subclasses
Instance Attribute Summary collapse
-
#base_dir ⇒ Object
readonly
Returns the value of attribute base_dir.
-
#logger ⇒ Object
Returns the value of attribute logger.
Instance Method Summary collapse
- #commands_dir ⇒ Object
- #hosts_dir ⇒ Object
-
#initialize(timeout: 60, verbose: true, base_dir: Dir.pwd, logger: $stdout) ⇒ ThrowerBase
constructor
A new instance of ThrowerBase.
- #prompts_dir ⇒ Object
Constructor Details
#initialize(timeout: 60, verbose: true, base_dir: Dir.pwd, logger: $stdout) ⇒ ThrowerBase
Returns a new instance of ThrowerBase.
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/expectacle/thrower_base.rb', line 15 def initialize(timeout: 60, verbose: true, base_dir: Dir.pwd, logger: $stdout) # 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 ⇒ Object (readonly)
Returns the value of attribute base_dir.
13 14 15 |
# File 'lib/expectacle/thrower_base.rb', line 13 def base_dir @base_dir end |
#logger ⇒ Object
Returns the value of attribute logger.
12 13 14 |
# File 'lib/expectacle/thrower_base.rb', line 12 def logger @logger end |
Instance Method Details
#commands_dir ⇒ Object
37 38 39 |
# File 'lib/expectacle/thrower_base.rb', line 37 def commands_dir File.join @base_dir, 'commands' end |
#hosts_dir ⇒ Object
33 34 35 |
# File 'lib/expectacle/thrower_base.rb', line 33 def hosts_dir File.join @base_dir, 'hosts' end |
#prompts_dir ⇒ Object
29 30 31 |
# File 'lib/expectacle/thrower_base.rb', line 29 def prompts_dir File.join @base_dir, 'prompts' end |