Debian Codegraph @

examples/i18n/mustache_i18n2.rb

raw symbols SCIP
1 class Stache18n
2 @@tags = {
3 'comment-and-close' => 'Comment and close',
4 'github' => 'GitHub',
5 'social-coding' => 'Social Coding'
6 }
7
8 def self.t
9 new
10 end
11
12 def method_missing(tag)
13 @@tags[tag.to_s]
14 end
15
16 def respond_to?(tag)
17 @@tags[tag.to_s]
18 end
19 end
20
21 puts Mustache.render(<<END, Stache18n)
22 <title>{{t.github}} - {{t.social-coding}}</title>
23 END