typespec 0.1.0.5 → 0.1.0.6

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: 1b4c3250a213fef2d63dacfb1bb6e8e853b15ea8
4
- data.tar.gz: 2e81950ca48db405ae6e12ae8fe639f9b7d1123e
3
+ metadata.gz: ddfcf8dfafb5a8295b92253447cb43a9e83a6623
4
+ data.tar.gz: b71676b0515e45c7e0e7ee0a59aa022eea3ab84d
5
5
  SHA512:
6
- metadata.gz: 764324cbcae4b560963efffc457f64105cb8dcc7cf29df66be75047b58786314297c0e3ffaef108e0dc702aef5e562ee0c689dbf0c5db8d9a0be2ecf1fd1fbf6
7
- data.tar.gz: 98747f6088b7340efa048b8a242614fb3350ffe71aa96c55a638fb74c61bca099bf5502ffddc36873c63d45c0cc85c12362546cb24fdd1a9bef4d896ed04c369
6
+ metadata.gz: 595f9a3c3199868f4ebbfe55d0e3353b54edd5a5f37aa789fa1a2d456c39c59e8a1dc2fbc2d97a5a3ce32c17f9fe63fade4be69633b9c1337d447d85f07df4bd
7
+ data.tar.gz: 06be9dde73d6e75b8a855f590762c4d80d851939e71e4f62ff0ebccc5c15010d4e435680f7b11ba750f674b042709264609d4562df099216e333a9bd50f316a0
data/lib/typespec.rb CHANGED
@@ -82,7 +82,7 @@ module Typespec
82
82
  end
83
83
 
84
84
  def valid?(value)
85
- if value.is_a? Array
85
+ if value.is_a? ::Array
86
86
  value.all?{|element| @element.valid?(element)}
87
87
  else
88
88
  false
@@ -105,7 +105,7 @@ module Typespec
105
105
  end
106
106
 
107
107
  def valid?(value)
108
- if value.is_a? Hash
108
+ if value.is_a? ::Hash
109
109
  value.all? do |k, v|
110
110
  @pairs.any? do |pair|
111
111
  pair.zip([k,v]).all? {|typespec, value| typespec.valid?(value)}
@@ -137,7 +137,7 @@ module Typespec
137
137
  end
138
138
 
139
139
  def valid?(struct, opts={})
140
- if struct.instance_of? Object
140
+ if struct.instance_of? ::Object
141
141
  ignore_if_not_in_spec = opts.fetch(:ignore_if_not_in_spec, false)
142
142
  struct.instance_variables.all? do |property|
143
143
  undecorated = property.to_s[1..-1].to_sym
data/lib/typespec/gem.rb CHANGED
@@ -41,7 +41,7 @@ module Typespec
41
41
  end
42
42
 
43
43
  module VERSION #:nodoc:
44
- MAJOR, MINOR, PATCH, PRE = [0, 1, 0, 5]
44
+ MAJOR, MINOR, PATCH, PRE = [0, 1, 0, 6]
45
45
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
46
46
  end
47
47
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typespec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.5
4
+ version: 0.1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Williams