app/hunter.rb
# Returns an Array of Hash (hunting rules from YAML files)
#
# return [Array<Hash>]
Returns an Array of Hash (hunting rules from YAML files)
return [Array]
Returns an Array of Hash ( hunting rules from YAML files ) return [ Array ]
def rules
      @rules ||= [].tap do |out|
        yaml = YAML.load_file File.expand_path("rules/hunt.yml", __dir__)
        if yaml.dig("meta", "enable")
          yaml.dig("rules").each { |rule| out << rule }
        end
      end
    end
def rules @rules ||= [ ] . tap do | out | yaml = YAML . load_file File . expand_path ( "rules/hunt.yml" , __dir__ ) if yaml . dig ( "meta" , "enable" ) yaml . dig ( "rules" ) . each { | rule | out << rule } end end end
Returns an Array of Hash (hunting rules from YAML files)
return [Array<Hash>]
Returns an Array of Hash ( hunting rules from YAML files ) return [ Array<Hash > ]