erb_parser 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/erb_parser.rb +2 -2
  2. metadata +1 -1
@@ -9,13 +9,13 @@ module ErbParser
9
9
  def self.parse(str, options = {})
10
10
  result = ParsedErb.new TreetopRunner.run(str)
11
11
 
12
- if options[:transform]
12
+ if options[:transform] or options[:map]
13
13
  result.tokens.map do |elem|
14
14
  case elem
15
15
  when String
16
16
  elem
17
17
  when ErbTag
18
- options[:transform].call(elem)
18
+ (options[:transform] || options[:map]).call(elem)
19
19
  end
20
20
  end.join
21
21
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erb_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: