Skip to content

Commit 66f1d79

Browse files
committed
Rather than duplicate methods, just use delegate
1 parent ea51fe1 commit 66f1d79

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/ice_cube/i18n.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,8 @@ module I18n
55

66
LOCALES_PATH = File.expand_path(File.join('..', '..', '..', 'config', 'locales'), __FILE__)
77

8-
def self.t(*args, **kwargs)
9-
backend.t(*args, **kwargs)
10-
end
11-
12-
def self.l(*args, **kwargs)
13-
backend.l(*args, **kwargs)
8+
class << self
9+
delegate :t, :l, to: :backend
1410
end
1511

1612
def self.backend

0 commit comments

Comments
 (0)