module Doc::Configurator::Ruby::Stdlib
Constants
- STDLIB_CONFIG_NAME
- STDLIB_CONFIG_URL
- STDLIB_CONFIG_VENDOR_PATH
Public Instance Methods
download_stdlib_config()
click to toggle source
# File lib/doc/configurator/ruby/stdlib.rb, line 28 def download_stdlib_config url = URI.parse(STDLIB_CONFIG_URL) response = Net::HTTP.start(url.host, url.port){ |http| http.get(url.path) } if response.kind_of?(Net::HTTPSuccess) stdlib_config_path.write(response.body) end end
read_stdlib_config()
click to toggle source
# File lib/doc/configurator/ruby/stdlib.rb, line 24 def read_stdlib_config YAML.load_file stdlib_config_path if stdlib_config_path.size? end
stdlib_config(update)
click to toggle source
# File lib/doc/configurator/ruby/stdlib.rb, line 13 def stdlib_config(update) if update || !read_stdlib_config download_stdlib_config end read_stdlib_config || YAML.load_file(STDLIB_CONFIG_VENDOR_PATH) end
stdlib_config_path()
click to toggle source
# File lib/doc/configurator/ruby/stdlib.rb, line 20 def stdlib_config_path sources_dir / STDLIB_CONFIG_NAME end