Class: Prick::Build::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/builder/parser.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(conn) ⇒ Parser

attr_reader :schemas



14
15
16
# File 'lib/builder/parser.rb', line 14

def initialize(conn)
  @conn = conn
end

Instance Attribute Details

#connObject (readonly)

Returns the value of attribute conn.



9
10
11
# File 'lib/builder/parser.rb', line 9

def conn
  @conn
end

#dirObject (readonly)

Returns the value of attribute dir.



10
11
12
# File 'lib/builder/parser.rb', line 10

def dir
  @dir
end

#unitObject (readonly)

Returns the value of attribute unit.



11
12
13
# File 'lib/builder/parser.rb', line 11

def unit
  @unit
end

Class Method Details

.parse(conn, dir) ⇒ Object



4
5
6
7
# File 'lib/builder/parser.rb', line 4

def self.parse(conn, dir)
  Parser.new(conn).parse(dir).unit
#       [parser.unit, parser.schemas]
end

Instance Method Details

#parse(dir) ⇒ Object



18
19
20
21
22
23
# File 'lib/builder/parser.rb', line 18

def parse(dir)
  @dir = dir
#       @schemas = {}
  parse_directory(nil, dir)
  self
end