Class: OverpassDoc::Package

Inherits:
Object
  • Object
show all
Defined in:
lib/overpass-doc/package.rb

Overview

A directory containing a package.json, query files and supporting assets

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(src_dir) ⇒ Package

Returns a new instance of Package.



6
7
8
9
10
# File 'lib/overpass-doc/package.rb', line 6

def initialize(src_dir)
  @dir = src_dir
  @metadata = ()
  @queries = parse_queries()
end

Instance Attribute Details

#dirObject (readonly)

Returns the value of attribute dir.



4
5
6
# File 'lib/overpass-doc/package.rb', line 4

def dir
  @dir
end

#metadataObject (readonly)

Returns the value of attribute metadata.



4
5
6
# File 'lib/overpass-doc/package.rb', line 4

def 
  @metadata
end

#queriesObject (readonly)

Returns the value of attribute queries.



4
5
6
# File 'lib/overpass-doc/package.rb', line 4

def queries
  @queries
end

Instance Method Details

#generate(generator) ⇒ Object



12
13
14
15
16
# File 'lib/overpass-doc/package.rb', line 12

def generate(generator)
  generate_index(generator)
  generate_query_pages(generator)
  copy_extra_files(generator)
end