Module: Textpow

Defined in:
lib/textpow.rb,
lib/textpow/syntax.rb,
lib/textpow/syntax.rb,
lib/textpow/version.rb,
lib/textpow/score_manager.rb,
lib/textpow/debug_processor.rb,
lib/textpow/recording_processor.rb

Defined Under Namespace

Classes: DebugProcessor, ParsingError, RecordingProcessor, ScoreManager, SyntaxNode, SyntaxProxy

Constant Summary collapse

RUBY_19 =
(RUBY_VERSION > "1.9.0")
VERSION =
Version = "1.4.0"
@@syntax =
{}

Class Method Summary collapse

Class Method Details

.syntax(syntax_name) ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/textpow.rb', line 16

def self.syntax(syntax_name)
  key = syntax_name.downcase
  if @@syntax.has_key?(key)
    @@syntax[key]
  else
    @@syntax[key] = uncached_syntax(syntax_name)
  end
end

.syntax_pathObject



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

def self.syntax_path
  File.join(File.dirname(__FILE__), 'textpow', 'syntax')
end