soar_lexicon 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8ac53357f62d2aa93269853bcf7abed99abbc45c
4
- data.tar.gz: 1af0b3a648258b65e94340371d97c15c924a28ca
3
+ metadata.gz: 6bf31d8e784f21a5fd560b0a1a95dac003be8496
4
+ data.tar.gz: 2a85ff54ce8f27474510fb533b9b344413c93aea
5
5
  SHA512:
6
- metadata.gz: 93d1024161709b7a05eb1ee80e1b1968987dbeccb575c23fb47a1ea9af01f2ea5a9c649568ac570dcc05b4d5e97cab86c39702cb2dbd6148678b77f353e8e3dd
7
- data.tar.gz: a3a1d3b5468a32e9ed4af50eeaa41c085e1ead696172121cfeaf7c096b0ea07939a3b258b7d8ca49e0e65400a4fe22f66a0e19ed4aed9bc118184a62443821d4
6
+ metadata.gz: e5ad159d8fb686b9101a2611cef225a110311d3dc67d2b45fff98a30f3a0cd9c120206884aa551df27b690635c51019325b8e1994c207e13c6150827f2f0dbbc
7
+ data.tar.gz: 34fdbacc514a43a7e4d6a08f426e5858ce9a419b6d1842a82b484bbbb018589d55fe34d626135f9a0d00c3fb5cf565c4c8cfdc3f57fbec73fe761faaa7c542ac
@@ -1,3 +1,3 @@
1
1
  module SoarLexicon
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/lib/soar_lexicon.rb CHANGED
@@ -19,11 +19,13 @@ module SoarLexicon
19
19
  end
20
20
 
21
21
  def self.describe(lexicon)
22
+ return nil if lexicon.nil?
22
23
  translator = Wadling::LexiconTranslator.new(SoarLexicon::Lexicon::WADL_XSL)
23
24
  translator.translate_resources_into_wadl(lexicon)
24
25
  end
25
26
 
26
27
  def self.describe_resource(lexicon, route)
28
+ return nil if lexicon.nil? or lexicon[route].nil?
27
29
  translator = Wadling::LexiconTranslator.new(SoarLexicon::Lexicon::WADL_XSL)
28
30
  data = {}
29
31
  data[route] = lexicon[route]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soar_lexicon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernst Van Graan