CrystalRandomAgent
Constants
CONFIG = YAML.parse(FLAT_YAML)
CONFIG_FILE = File.expand_path("./user_agents.yml", "/tmp/tmp.AdPoEN/src/src")
FLAT_YAML = {{ system("echo '\"'; cat /tmp/tmp.AdPoEN/src/src/user_agents.yml; echo '\"'") }}
USER_AGENTS = CONFIG["user_agents"].as_h.map do |_, subtypes|
(YAML::Any.new(subtypes)).as_h.map do |_, agents|
(YAML::Any.new(agents)).as_a.map do |ua| ua.as(String) end
end
end.flatten
VERSION = "0.1.0"
Instance methods
get_random_user_agent
Source