class Rutty::Runner
The Rutty::Runner
class includes mixins from the other modules. All end-user interaction should be done through this class.
@author Josh Lindsey @since 2.0.0
Attributes
Public Class Methods
Initialize a new {Rutty::Runner} instance
@param config_dir
[String] Optional parameter specifying the directory RuTTY has been init’d into
# File lib/rutty/runner.rb, line 30 def initialize config_dir = nil self.config_dir = config_dir end
Public Instance Methods
The user-specified config directory, falling back to the default on nil. Used by {Rutty::Nodes.load_config} and {Rutty::Config.load_config} to determine where to look for config files.
@see Rutty::Consts::CONF_DIR @return [String] The user-specified config directory, falling back to the default on nil.
# File lib/rutty/runner.rb, line 59 def config_dir (@config_dir.nil? && Rutty::Consts::CONF_DIR) || @config_dir end
Sets @output_format, or raises an exception if the value is not included in {Rutty::Consts::OUTPUT_FORMATS}.
@see Rutty::Consts::OUTPUT_FORMATS @raise [Rutty::InvalidOutputFormat] On a disallowed output format string
# File lib/rutty/runner.rb, line 80 def output_format= format raise Rutty::InvalidOutputFormat.new "Invalid output format: #{format}" unless Rutty::Consts::OUTPUT_FORMATS.include? format @output_format = format end