phrase_assembler 1.2.3 → 1.2.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/pa_proxies/pa_lang_proxy.rb +2 -4
  2. metadata +4 -4
@@ -30,6 +30,7 @@ class PALangProxy < PATokenProxy
30
30
  end
31
31
 
32
32
  def get_grammar_token(key, g_value, values)
33
+ g_value = g_value.to_sym if (!g_value.nil? and g_value!="")
33
34
  if @grammar[key].nil?
34
35
  raise 'Grammar key not existing'
35
36
  elsif !@grammar[key][g_value].nil?
@@ -75,10 +76,7 @@ class PALangProxy < PATokenProxy
75
76
  elsif p_options.options_hash.has_key?("#{options_key}_#{grammar_key}".to_sym)
76
77
  grammar_value = p_options.options_hash["#{options_key}_#{grammar_key}".to_sym]
77
78
  end
78
- if grammar_value.nil?
79
- raise 'No token for lang'
80
- end
81
- add_options["!#{clear_token}"] = get_grammar_token(grammar_key.to_sym, grammar_value.to_sym, values)
79
+ add_options["!#{clear_token}"] = get_grammar_token(grammar_key.to_sym, grammar_value, values)
82
80
  "{*!#{clear_token}*}"
83
81
  }
84
82
  return super(p_data, add_options, p_options)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phrase_assembler
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 3
10
- version: 1.2.3
9
+ - 4
10
+ version: 1.2.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Lovro \xC5\xBDmak, Radan Skori\xC4\x87, Drap"
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-14 00:00:00 +01:00
18
+ date: 2011-02-16 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency