class Undercase::Category
Attributes
name[R]
patterns[R]
Public Class Methods
new(key)
click to toggle source
# File lib/undercase/category.rb, line 8 def initialize(key) @name = categories[key] @patterns = Pattern.all.select { |pattern| pattern.category == key.to_sym } end
Private Instance Methods
categories()
click to toggle source
# File lib/undercase/category.rb, line 15 def categories file = File.expand_path('../categories.yml', __FILE__) YAML.load_file(file) end