taipo 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/taipo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Taipo
2
- VERSION = "1.3.0"
2
+ VERSION = "1.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taipo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Camilleri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-29 00:00:00.000000000 Z
11
+ date: 2018-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -132,11 +132,16 @@ files:
132
132
  - lib/taipo/exceptions/syntax_error.rb
133
133
  - lib/taipo/exceptions/type_error.rb
134
134
  - lib/taipo/parser.rb
135
+ - lib/taipo/parser/stack.rb
135
136
  - lib/taipo/parser/syntax_state.rb
136
137
  - lib/taipo/parser/validater.rb
138
+ - lib/taipo/refinements.rb
137
139
  - lib/taipo/type_element.rb
138
- - lib/taipo/type_element/child_type.rb
140
+ - lib/taipo/type_element/children.rb
139
141
  - lib/taipo/type_element/constraint.rb
142
+ - lib/taipo/type_element/constraints.rb
143
+ - lib/taipo/type_elements.rb
144
+ - lib/taipo/utilities.rb
140
145
  - lib/taipo/version.rb
141
146
  - taipo.gemspec
142
147
  homepage: https://github.com/pyrmont/taipo/
@@ -1,40 +0,0 @@
1
- module Taipo
2
- class TypeElement
3
-
4
- # A collection of Taipo::TypeElement
5
- # @since 1.0.0
6
- # @api private
7
- class ChildType < Array
8
-
9
- # Initialize a new collection
10
- #
11
- # @note The +components+ argument is two-dimensional array because the
12
- # element returned by an enumerator for a collection can consist of
13
- # multiple elements (eg. a Hash, where it consists of two elements).
14
- #
15
- # @param components [Array<Array<Taipo::TypeElement>>] the components that
16
- # will make up the ChildType
17
- #
18
- # @since 1.0.0
19
- # @api private
20
- def initialize(components = nil)
21
- components.each { |c| self.push c } unless components.nil?
22
- end
23
-
24
- # Return the String representation of this ChildType
25
- #
26
- # @since 1.1.0
27
- # @api private
28
- def to_s
29
- inner = self.reduce(nil) do |memo_e,component|
30
- el = component.reduce(nil) do |memo_c,c|
31
- (memo_c.nil?) ? c.to_s : memo_c + '|' + c.to_s
32
- end
33
- (memo_e.nil?) ? el : memo_e + ',' + el
34
- end
35
- '<' + inner + '>'
36
- end
37
- end
38
- end
39
- end
40
-