Class: BooticCli::FileRunner
- Inherits:
-
Object
- Object
- BooticCli::FileRunner
- Includes:
- Connectivity
- Defined in:
- lib/bootic_cli/file_runner.rb
Constant Summary
Constants included from Connectivity
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(root, file_name) ⇒ FileRunner
constructor
A new instance of FileRunner.
-
#root ⇒ Object
#root is already defined in Connectivity but we want to pass a pre-initialized root to avoid having to re-fetch root from API.
- #run ⇒ Object
Constructor Details
#initialize(root, file_name) ⇒ FileRunner
Returns a new instance of FileRunner.
9 10 11 12 |
# File 'lib/bootic_cli/file_runner.rb', line 9 def initialize(root, file_name) @root = root @file_name = file_name end |
Class Method Details
Instance Method Details
#root ⇒ Object
#root is already defined in Connectivity but we want to pass a pre-initialized root to avoid having to re-fetch root from API
21 22 23 |
# File 'lib/bootic_cli/file_runner.rb', line 21 def root @root end |
#run ⇒ Object
14 15 16 |
# File 'lib/bootic_cli/file_runner.rb', line 14 def run self.instance_eval File.read(@file_name), @file_name end |