Class: OracleSqlParser::Grammar::ReservedWordGenerator::MatchKeyword
- Defined in:
- lib/oracle-sql-parser/grammar/reserved_word_generator.rb
Instance Attribute Summary collapse
-
#rule_name ⇒ Object
readonly
Returns the value of attribute rule_name.
Instance Method Summary collapse
-
#initialize(rule_name) ⇒ MatchKeyword
constructor
A new instance of MatchKeyword.
- #to_s ⇒ Object
Constructor Details
#initialize(rule_name) ⇒ MatchKeyword
Returns a new instance of MatchKeyword.
49 50 51 |
# File 'lib/oracle-sql-parser/grammar/reserved_word_generator.rb', line 49 def initialize(rule_name) @rule_name = rule_name end |
Instance Attribute Details
#rule_name ⇒ Object (readonly)
Returns the value of attribute rule_name.
48 49 50 |
# File 'lib/oracle-sql-parser/grammar/reserved_word_generator.rb', line 48 def rule_name @rule_name end |
Instance Method Details
#to_s ⇒ Object
53 54 55 56 57 58 59 |
# File 'lib/oracle-sql-parser/grammar/reserved_word_generator.rb', line 53 def to_s content = [] content << " rule #{rule_name}" content << " [a-zA-Z0-9_]+ ![a-zA-Z0-9] &{|w| #{self.to_a.to_s}.include? w.first.text_value.upcase}" content << " end" content.join("\n") end |