Class: SQL::Abstract
- Inherits:
-
Object
- Object
- SQL::Abstract
- Defined in:
- lib/abstract-sql.rb
Instance Attribute Summary collapse
-
#parser ⇒ Object
readonly
Returns the value of attribute parser.
-
#transformer ⇒ Object
readonly
Returns the value of attribute transformer.
Instance Method Summary collapse
-
#initialize ⇒ Abstract
constructor
A new instance of Abstract.
- #parse(sql) ⇒ Object
Constructor Details
Instance Attribute Details
#parser ⇒ Object (readonly)
Returns the value of attribute parser.
8 9 10 |
# File 'lib/abstract-sql.rb', line 8 def parser @parser end |
#transformer ⇒ Object (readonly)
Returns the value of attribute transformer.
8 9 10 |
# File 'lib/abstract-sql.rb', line 8 def transformer @transformer end |
Instance Method Details
#parse(sql) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/abstract-sql.rb', line 15 def parse(sql) tree = @parser.parse(sql) while tree != (t = @transformer.apply(tree) ) tree = t end t end |