silly_templates 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/silly.rb +4 -2
- metadata +1 -1
data/lib/silly.rb
CHANGED
@@ -88,10 +88,12 @@ EOF
|
|
88
88
|
end
|
89
89
|
|
90
90
|
def gen_simple_function parsed
|
91
|
+
text = parsed[:texts].first
|
92
|
+
num_bits = text.bytes.count * 8
|
91
93
|
<<EOF
|
92
|
-
-spec render() ->
|
94
|
+
-spec render() -> <<_:#{num_bits}>>.
|
93
95
|
render() ->
|
94
|
-
<<"#{escape(
|
96
|
+
<<"#{escape(text)}">>.
|
95
97
|
EOF
|
96
98
|
end
|
97
99
|
|