csdl 0.2.1 → 0.2.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: 135ecbcd588b93734289488616a6da8e47933dc3
4
- data.tar.gz: 21e8f7d9fa247a9aecaae66c710cc0a85c07608f
3
+ metadata.gz: 9a5a81b67da628b0366680c16d783b9d1e2e0d00
4
+ data.tar.gz: 44909b7b6f3dbff37f522b702a25780cab4b6111
5
5
  SHA512:
6
- metadata.gz: 7d8499b0904fa8ce5da292cb8f9704407235549e4fd8052105883dce5a59bd3fcf067a82cbc77ca286b6fd25751139b6f610fc0ade7b0725c234601a52f363c8
7
- data.tar.gz: 7977cd29e77bc3e548a7019df211b063e218cf345d7ed4f3ce1dcde20f31be29b74422d851ae811156a808f144f4279d459e89f0533328f842601b76ccbe794f
6
+ metadata.gz: fc7266bfdc5c29092bf98b2b0f46fe71d6d2d0e8b37f64c2040d756e2b8ce7b371049fd479d6c32e29e4e4c675906e5bfb1b01ddfeba92f6838da06caf7605f2
7
+ data.tar.gz: e6d191dc4b1a39475dfdf088cf941608915d5e58415fa1e0a2bd06bdf056dbfe90b094ff822008085fce74c0470376850fe49445ffb0c797d6fd08da1a8feb30
data/lib/csdl/builder.rb CHANGED
@@ -230,9 +230,10 @@ module CSDL
230
230
  #
231
231
  def logical_group(logical_operator = nil, &block)
232
232
  children = __one_or_more_child_nodes(&block)
233
- return nil if children.empty?
234
233
 
235
- if logical_operator.nil?
234
+ if children.empty?
235
+ nil
236
+ elsif logical_operator.nil? || children.size == 1
236
237
  s(:logical_group, *children)
237
238
  else
238
239
  s(:logical_group, s(logical_operator, *children))
data/lib/csdl/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module CSDL
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csdl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - BJ Neilsen