Sha256: d569393f3eec71ba5a2c5bdffc6f89a41e4acc0357b0be548ba355e182ad2e59
Contents?: true
Size: 614 Bytes
Versions: 38
Compression:
Stored size: 614 Bytes
Contents
module RBeautify class Language @@languages = {} attr_reader :matchers attr_accessor :indent_size class << self def language(name) languages[name] end def languages @@languages end def add_language(name) languages[name] = new() end end def initialize @matchers = [] end def add_matcher(name, starts, ends, options = {}) self.matchers << BlockMatcher.new(self, name, starts, ends, options) end def matcher(name) self.matchers.detect { |matcher| matcher.name == name} end end end
Version data entries
38 entries across 38 versions & 2 rubygems