def load_yml(yml_file, mode = nil)
      if File.exist?(yml_file)
        yml_cfg = OpenStruct.new(YAML.load_file(yml_file))
        if mode.nil? || mode =~ /production/i
          yml_cfg.jira.each do |k, v|
            instance_variable_set("@#{k}", v)
          end
        else
          yml_cfg.send(mode).each do |k, v|
            instance_variable_set("@#{k}", v)
          end
        end
      else
        reset
      end
    end
def load_yml(yml_file, mode = nil)
      if File.exist?(yml_file)
        yml_cfg = OpenStruct.new(YAML.load_file(yml_file))
        if mode.nil? || mode =~ /production/i
          yml_cfg.jira.each do |k, v|
            instance_variable_set("@#{k}", v)
          end
        else
          yml_cfg.send(mode).each do |k, v|
            instance_variable_set("@#{k}", v)
          end
        end
      else
        reset
      end
    end
Loads the provided YML file.

 Can provide either direct or relational path to the file.
 It is recommended to send a direct path due to dynamic
 loading and/or different file locations due to different deployment methods.

 [Direct Path] /usr/project/somepath_to_file/jira.yml

 [Relational Path] Rails.root.to_s + "/config/jira.yml"

                   "./config/jira.yml"

 [Arguments]
 :yml_file    (required)    path to file to load

 :mode        (optional)    used to define environment type