rbytes 0.1.4 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +16 -0
- data/lib/ruby_bytes/compiler.rb +4 -0
- data/lib/ruby_bytes/thor.rb +1 -1
- data/lib/ruby_bytes/version.rb +1 -1
- data/templates/rbytes/core_ext.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8780a2ff433a3b3e11c59a05fe7bf73a1a742463c659bbf8abd835b17242d43
|
4
|
+
data.tar.gz: 10fd5d4eb9271e6e3be8fe2f71262e03a743dbf077b71a925498796c20e2cafe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c681d786e67cf6423e95b78b687bfec4dea5460ec3238656ed3319347240eae199a21fbf5bc05fb3d67a70fdd6862797712401085e239ce94c56ccb25f7ceea9
|
7
|
+
data.tar.gz: e8fae36e2fa7daa3acfd71a760b969e6c09c23dc248f1bedd479930e7c9e064b7c6027e987fa61683250c36a65398cc784f174f2f9890ce0a3764300abe76088
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -107,6 +107,22 @@ file "config/anycable.yml", ERB.new(
|
|
107
107
|
|
108
108
|
**NOTE:** By default, we assume that partials are stored next to the template's entry-point. Partials may have the "_" prefix and ".rb" or ".tt" suffixes.
|
109
109
|
|
110
|
+
Ruby Bytes can also import a sub-template into your template. Simply use the `#import_template` helper in your template:
|
111
|
+
|
112
|
+
```erb
|
113
|
+
# subtemplate/_partial.rb
|
114
|
+
say "Hello from subtemplate's partial!"
|
115
|
+
|
116
|
+
# subtemplate/subtemplate.rb
|
117
|
+
<%= include "partial" %>
|
118
|
+
|
119
|
+
# template.rb
|
120
|
+
<%= import_template("subtemplate/subtemplate.rb")>
|
121
|
+
```
|
122
|
+
|
123
|
+
Note that the full filename must be passed to the `#import_template` helper, including any file extension, unlike the `#include` helper. All templates within the subtemplate directory will consider that to be their root directory.
|
124
|
+
|
125
|
+
|
110
126
|
### Compiling templates
|
111
127
|
|
112
128
|
You can compile a template by using the `rbytes` executable:
|
data/lib/ruby_bytes/compiler.rb
CHANGED
data/lib/ruby_bytes/thor.rb
CHANGED
data/lib/ruby_bytes/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbytes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladimir Dementyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|