silly_templates 0.0.3 → 0.0.4

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.
Files changed (2) hide show
  1. data/lib/silly.rb +4 -2
  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() -> binary().
94
+ -spec render() -> <<_:#{num_bits}>>.
93
95
  render() ->
94
- <<"#{escape(parsed[:texts].first)}">>.
96
+ <<"#{escape(text)}">>.
95
97
  EOF
96
98
  end
97
99
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: silly_templates
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: