Class: VirtualKeywords::ParserStrategy
- Inherits:
-
Object
- Object
- VirtualKeywords::ParserStrategy
- Defined in:
- lib/virtual_keywords/parser_strategy.rb
Class Method Summary collapse
-
.new ⇒ Object
Factory method Create the appropriate strategy object for the current Ruby version.
Class Method Details
.new ⇒ Object
Factory method Create the appropriate strategy object for the current Ruby version.
5 6 7 8 9 10 11 |
# File 'lib/virtual_keywords/parser_strategy.rb', line 5 def self.new if RUBY_VERSION.start_with? '1.8' ParseTreeStrategy.new(ParseTree, SexpProcessor.new) else RubyParserStrategy.new(RubyParser.new) end end |