little_wheels 0.0.1 → 0.0.3

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 +25 -0
  3. metadata +2 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c536038b0e89d24bb3987f5b78fe08ec31e60cef149c4883161f5d340935f1a
4
- data.tar.gz: a9c3f6cc3aac663909664e98ca31ad99c2c271f20dc1bddaf020a20a8678ce39
3
+ metadata.gz: 40a772c615a29c04d3d82864115ed2707f24a44032d2174ed83cf52fdcf3915d
4
+ data.tar.gz: 42098f69d5cbe2f392b31b16cd470aec20bbb2ceed71bc2fbdd9c19be914c133
5
5
  SHA512:
6
- metadata.gz: 100731dd462f19ac92f5d6e041ca5124db45dc955e3c398e24fcd263ed1338f10c16b3155dc3787dde4d3a37248afc74fc08be9ec04fa00b11b86d2ecd3a13a7
7
- data.tar.gz: 10aadcf83c7dad25b31add6571d7255eb09690207bdeb5bb5f1e1c5c712ab17a42697e51c232a5f6a4274ee66e669dc0aa90832e7c642cab305013dca33b17c5
6
+ metadata.gz: 29b2ab4383e092b3f1da36bbefb3350d531dd61dc7ef3596c69dd6b43e43a77d641bc81cf0a526fddbbe215f9e097f387003a5fa25af09c7205e400fe1f6bd45
7
+ data.tar.gz: aba0286983144141e393c8bbbd7b13a432b962f018d1eaafb14891a263107917267a255787ae2d4b89155770f8691ffa71467c0fb3884ae6d984c45dbf8d61b9
@@ -0,0 +1,25 @@
1
+ module LittleWheels
2
+ VERSION = "0.0.3"
3
+
4
+ class Component
5
+ def t(template, **locals)
6
+ renderer.render(inline: template, locals:)
7
+ end
8
+
9
+ def t!(template, **locals)
10
+ renderer.render(template, locals:, layout: nil)
11
+ end
12
+
13
+ def to_s
14
+ t!("shared/#{name}", c: self)
15
+ end
16
+
17
+ def renderer
18
+ ApplicationController
19
+ end
20
+
21
+ def name
22
+ self.class.name.underscore
23
+ end
24
+ end
25
+ 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.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregory Brown
@@ -18,6 +18,7 @@ extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
20
  - LICENSE
21
+ - lib/little_wheels.rb
21
22
  homepage:
22
23
  licenses:
23
24
  - MIT