Class: PeakFlowUtils::RailsHandler
Instance Method Summary
collapse
#add_translations_for_hash, #enabled?, #translations_for_hash_recursive
Instance Method Details
#groups ⇒ Object
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# File 'app/handlers/peak_flow_utils/rails_handler.rb', line 2
def groups
ArrayEnumerator.new do |yielder|
groups = %w[date_time errors helpers numbers support]
groups.each do |group|
yielder << PeakFlowUtils::GroupService.new(
id: group,
handler: self,
data: {
name: group.humanize
}
)
end
end
end
|
#translations_for_group(group) ⇒ Object
18
19
20
21
22
23
|
# File 'app/handlers/peak_flow_utils/rails_handler.rb', line 18
def translations_for_group(group)
ArrayEnumerator.new do |yielder|
dir = Rails.root.join("config", "locales", "awesome_translations", group.id).to_s
__send__("translations_for_#{group.id}", dir, group, yielder)
end
end
|