class ImportGrammar

Represents a Textmate Grammar that has been imported This exists entirely to override Grammar#[] and should not be normally created

@api private

Public Class Methods

new(keys) click to toggle source

(see Grammar#initialize)

Calls superclass method Grammar::new
# File lib/ruby_grammar_builder/grammar.rb, line 657
def initialize(keys)
    super(keys)
end

Public Instance Methods

[](key) click to toggle source

(see Grammar#[]) @note patterns that have been imported from a file cannot be be accessed

# File lib/ruby_grammar_builder/grammar.rb, line 663
def [](key)
    raise "#{key} is a not a pattern and cannot be referenced" if @repository[key].is_a? Hash

    @repository[key]
end