Class: Gvcs::Config
Overview
configuration elements for the library
Instance Method Summary collapse
- #command_output ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #is_show_vcs_command? ⇒ Boolean
- #show_vcs_command(val, out = STDOUT) ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
26 27 28 29 |
# File 'lib/gvcs.rb', line 26 def initialize @showCommand = false @commandOut = STDOUT end |
Instance Method Details
#command_output ⇒ Object
46 47 48 |
# File 'lib/gvcs.rb', line 46 def command_output @commandOut end |
#is_show_vcs_command? ⇒ Boolean
42 43 44 |
# File 'lib/gvcs.rb', line 42 def is_show_vcs_command? @showCommand end |
#show_vcs_command(val, out = STDOUT) ⇒ Object
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/gvcs.rb', line 31 def show_vcs_command(val, out = STDOUT) if val == true or val == false @showCommand = val if @commandOut.respond_to?(:puts) @commandOut = out else raise Error, "Command output minimally need to support puts() call. Given #{@commandOut}" end end end |