themes.rb 230 B

12345678910111213141516
  1. # frozen_string_literal: true
  2. require 'singleton'
  3. require 'yaml'
  4. class Themes
  5. include Singleton
  6. def initialize
  7. @conf = YAML.load_file(Rails.root.join('config', 'themes.yml'))
  8. end
  9. def names
  10. @conf.keys
  11. end
  12. end