little_wheels 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/little_wheels.rb +3 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 40a772c615a29c04d3d82864115ed2707f24a44032d2174ed83cf52fdcf3915d
4
- data.tar.gz: 42098f69d5cbe2f392b31b16cd470aec20bbb2ceed71bc2fbdd9c19be914c133
3
+ metadata.gz: 1239b1153781bf67297befc609b59aaf899cb14cf1626d1c69501a98dde62997
4
+ data.tar.gz: 56876fa5ab4ab7a25386fd7ea876346f2f5dcf0119357b695219259a3dc01f9e
5
5
  SHA512:
6
- metadata.gz: 29b2ab4383e092b3f1da36bbefb3350d531dd61dc7ef3596c69dd6b43e43a77d641bc81cf0a526fddbbe215f9e097f387003a5fa25af09c7205e400fe1f6bd45
7
- data.tar.gz: aba0286983144141e393c8bbbd7b13a432b962f018d1eaafb14891a263107917267a255787ae2d4b89155770f8691ffa71467c0fb3884ae6d984c45dbf8d61b9
6
+ metadata.gz: 7ff56bd1ad67c62cf809fb7fd41989830df7a5e015cae8dcf82a6541ba8289e2316b4fc9a16195f42cf641d1e5380bf6a7a4d53212ad1478defbe47911038bec
7
+ data.tar.gz: ec0e843354fe1d928d9cebbea6be21655afe9bcf6559c0047bc4e4109e0160374f0b1a924458ad2133dc4f64b863f6be91811533a9e8c20341f6df73312b9a27
data/lib/little_wheels.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module LittleWheels
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.5"
3
3
 
4
4
  class Component
5
5
  def t(template, **locals)
@@ -11,14 +11,14 @@ module LittleWheels
11
11
  end
12
12
 
13
13
  def to_s
14
- t!("shared/#{name}", c: self)
14
+ self.class.const_defined?("TEMPLATE") ? t(self.class.const_get("TEMPLATE"), c: self) : t!("shared/#{default_template_name}", c: self)
15
15
  end
16
16
 
17
17
  def renderer
18
18
  ApplicationController
19
19
  end
20
20
 
21
- def name
21
+ def default_template_name
22
22
  self.class.name.underscore
23
23
  end
24
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: little_wheels
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregory Brown