Class: EmailTemplatesFinder
- Inherits:
-
Object
- Object
- EmailTemplatesFinder
- Defined in:
- lib/email_templates_finder.rb
Instance Attribute Summary collapse
-
#list ⇒ Object
readonly
Returns the value of attribute list.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(obj) ⇒ EmailTemplatesFinder
constructor
A new instance of EmailTemplatesFinder.
Constructor Details
#initialize(obj) ⇒ EmailTemplatesFinder
Returns a new instance of EmailTemplatesFinder.
12 13 14 15 16 17 |
# File 'lib/email_templates_finder.rb', line 12 def initialize(obj) @obj = obj @list = [] check(@obj, "") @list.sort! end |
Instance Attribute Details
#list ⇒ Object (readonly)
Returns the value of attribute list.
10 11 12 |
# File 'lib/email_templates_finder.rb', line 10 def list @list end |
Class Method Details
.list ⇒ Object
4 5 6 7 8 |
# File 'lib/email_templates_finder.rb', line 4 def self.list path = File.join(Rails.root, "config", "locales", "server.en.yml") yaml = YAML.load_file(path, aliases: true) new(yaml).list end |