Sha256: 5ecc7f99912c10d975473a8a324d92ddc3d4924e40da5df7f8866d0073ec4257

Contents?: true

Size: 507 Bytes

Versions: 57

Compression:

Stored size: 507 Bytes

Contents

module BooticCli
  class FileRunner
    include BooticCli::Connectivity

    def self.run(root, file_name)
      new(root, file_name).run
    end

    def initialize(root, file_name)
      @root = root
      @file_name = file_name
    end

    def run
      self.instance_eval File.read(@file_name), @file_name
    end

    # #root is already defined in Connectivity
    # but we want to pass a pre-initialized root
    # to avoid having to re-fetch root from API
    def root
      @root
    end
  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
bootic_cli-1.2.0 lib/bootic_cli/file_runner.rb
bootic_cli-1.1.0 lib/bootic_cli/file_runner.rb
bootic_cli-1.0.0 lib/bootic_cli/file_runner.rb
bootic_cli-0.9.6 lib/bootic_cli/file_runner.rb
bootic_cli-0.9.5 lib/bootic_cli/file_runner.rb
bootic_cli-0.9.4 lib/bootic_cli/file_runner.rb
bootic_cli-0.9.3 lib/bootic_cli/file_runner.rb
bootic_cli-0.9.2 lib/bootic_cli/file_runner.rb
bootic_cli-0.9.1 lib/bootic_cli/file_runner.rb
bootic_cli-0.9.0 lib/bootic_cli/file_runner.rb
bootic_cli-0.8.2 lib/bootic_cli/file_runner.rb
bootic_cli-0.8.1 lib/bootic_cli/file_runner.rb
bootic_cli-0.8.0 lib/bootic_cli/file_runner.rb
bootic_cli-0.7.3 lib/bootic_cli/file_runner.rb
bootic_cli-0.7.2 lib/bootic_cli/file_runner.rb
bootic_cli-0.7.1 lib/bootic_cli/file_runner.rb
bootic_cli-0.7.0 lib/bootic_cli/file_runner.rb
bootic_cli-0.6.7 lib/bootic_cli/file_runner.rb
bootic_cli-0.6.6 lib/bootic_cli/file_runner.rb
bootic_cli-0.6.5 lib/bootic_cli/file_runner.rb