Class: Prick::Build::Parser
- Inherits:
-
Object
- Object
- Prick::Build::Parser
- Defined in:
- lib/builder/parser.rb
Instance Attribute Summary collapse
-
#conn ⇒ Object
readonly
Returns the value of attribute conn.
-
#dir ⇒ Object
readonly
Returns the value of attribute dir.
-
#unit ⇒ Object
readonly
Returns the value of attribute unit.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(conn) ⇒ Parser
constructor
attr_reader :schemas.
- #parse(dir) ⇒ Object
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
#conn ⇒ Object (readonly)
Returns the value of attribute conn.
9 10 11 |
# File 'lib/builder/parser.rb', line 9 def conn @conn end |
#dir ⇒ Object (readonly)
Returns the value of attribute dir.
10 11 12 |
# File 'lib/builder/parser.rb', line 10 def dir @dir end |
#unit ⇒ Object (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 |