Module: Doc::Configurator::Ruby::Stdlib
- Included in:
- Doc::Configurator::Ruby
- Defined in:
- lib/doc/configurator/ruby/stdlib.rb
Constant Summary collapse
- STDLIB_CONFIG_URL =
'http://stdlib-doc.rubyforge.org/svn/trunk/data/gendoc.yaml'
Instance Method Summary collapse
- #download_stdlib_config ⇒ Object
- #read_stdlib_config ⇒ Object
- #stdlib_config(update) ⇒ Object
- #stdlib_config_path ⇒ Object
Instance Method Details
#download_stdlib_config ⇒ Object
26 27 28 |
# File 'lib/doc/configurator/ruby/stdlib.rb', line 26 def download_stdlib_config stdlib_config_path.write(Net::HTTP.get(URI.parse(STDLIB_CONFIG_URL))) end |
#read_stdlib_config ⇒ Object
22 23 24 |
# File 'lib/doc/configurator/ruby/stdlib.rb', line 22 def read_stdlib_config YAML.load_file stdlib_config_path if stdlib_config_path.readable? end |
#stdlib_config(update) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/doc/configurator/ruby/stdlib.rb', line 11 def stdlib_config(update) if update || !read_stdlib_config download_stdlib_config end read_stdlib_config end |
#stdlib_config_path ⇒ Object
18 19 20 |
# File 'lib/doc/configurator/ruby/stdlib.rb', line 18 def stdlib_config_path sources_dir / 'stdlib-config.yaml' end |