Sha256: 4619ee583b60683cc95d97478e404d7f7329dd3e1540f5d249620c120a77c547
Contents?: true
Size: 1.05 KB
Versions: 1
Compression:
Stored size: 1.05 KB
Contents
require 'guard/rack' module Guard class Rack < Plugin class Command < String attr_reader :options def initialize(options = {}) @options = options super(build.join(' ')) end private def build cmd = [options[:cmd]] cmd << configuration cmd << environment cmd << host cmd << port cmd << daemon cmd << debug cmd << server cmd.flatten.compact end def configuration [options[:config]] end def daemon return unless options[:daemon] ['--daemonize', options[:daemon]] end def debug return unless options[:debugger] ['--debug', options[:debugger]] end def environment ['--env', options[:environment]] end def host ['--host', options[:host]] end def port ['--port', options[:port]] end def server return unless options[:server] ['--server', options[:server]] end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
guard-rack-2.1.0 | lib/guard/rack/command.rb |