Module: Guides

Defined in:
lib/guides.rb,
lib/guides/cli.rb,
lib/guides/new.rb,
lib/guides/helpers.rb,
lib/guides/indexer.rb,
lib/guides/preview.rb,
lib/guides/version.rb,
lib/guides/generator.rb,
lib/guides/levenshtein.rb,
lib/guides/w3c_validator.rb

Defined Under Namespace

Modules: Helpers, Levenshtein Classes: App, CLI, Error, FormatError, Generator, Indexer, New, Preview, Validator

Constant Summary collapse

VERSION =
"0.6.4"

Class Method Summary collapse

Class Method Details

.meta(reload = false) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/guides.rb', line 22

def meta(reload = false)
  @meta = nil if reload

  @meta ||= begin
    if File.exist?("#{root}/guides.yml")
      YAML.load_file("#{root}/guides.yml")
      # TODO: Sanity check the output
    else
      raise "#{root}/guides.yml was not found"
    end
  end
end

.rootObject



17
18
19
20
# File 'lib/guides.rb', line 17

def root
  # TODO: Search for guides.yml
  File.expand_path(Dir.pwd)
end