class RBeautify::Language

Attributes

indent_size[RW]
matchers[R]

Public Class Methods

add_language(name) click to toggle source
# File lib/ruby-beautify/lib/ruby-beautify/language.rb, line 19
def add_language(name)
  languages[name] = new()
end
language(name) click to toggle source
# File lib/ruby-beautify/lib/ruby-beautify/language.rb, line 11
def language(name)
  languages[name]
end
languages() click to toggle source
# File lib/ruby-beautify/lib/ruby-beautify/language.rb, line 15
def languages
  @@languages
end
new() click to toggle source
# File lib/ruby-beautify/lib/ruby-beautify/language.rb, line 24
def initialize
  @matchers = []
end

Public Instance Methods

add_matcher(name, starts, ends, options = {}) click to toggle source
# File lib/ruby-beautify/lib/ruby-beautify/language.rb, line 28
def add_matcher(name, starts, ends, options = {})
  self.matchers << BlockMatcher.new(self, name, starts, ends, options)
end
matcher(name) click to toggle source
# File lib/ruby-beautify/lib/ruby-beautify/language.rb, line 32
def matcher(name)
  self.matchers.detect { |matcher| matcher.name == name}
end