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.
- checksums.yaml +4 -4
- data/lib/little_wheels.rb +25 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40a772c615a29c04d3d82864115ed2707f24a44032d2174ed83cf52fdcf3915d
|
4
|
+
data.tar.gz: 42098f69d5cbe2f392b31b16cd470aec20bbb2ceed71bc2fbdd9c19be914c133
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|