Sha256: 42f0b5f15886f5951ed3410c39f85be2032c8e2cc4469f2b39d09f84d0103a17
Contents?: true
Size: 925 Bytes
Versions: 4
Compression:
Stored size: 925 Bytes
Contents
require 'lino' module RubyFly module Commands class Base attr_reader :binary def initialize(binary: nil) @binary = binary || RubyFly.configuration.binary end def stdin '' end def stdout STDOUT end def stderr STDERR end def execute(opts = {}) builder = instantiate_builder do_before(opts) configure_command(builder, opts) .build .execute( stdin: stdin, stdout: stdout, stderr: stderr) do_after(opts) end def instantiate_builder Lino::CommandLineBuilder .for_command(binary) .with_option_separator('=') end def do_before(opts) end def configure_command(builder, opts) builder end def do_after(opts) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems