schematic 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -35,7 +35,7 @@ module Schematic
35
35
  fields.each { |field| ignored_elements << field }
36
36
  end
37
37
 
38
- def element(*args)
38
+ def add(*args)
39
39
  name = args.shift
40
40
  if name.is_a? Hash
41
41
  added_elements[name.keys.first] = name.values.first
@@ -1,3 +1,3 @@
1
1
  module Schematic
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
@@ -25,7 +25,7 @@ describe Schematic::Generator::Sandbox do
25
25
  context "given a single element" do
26
26
  it "should add the method to the element list" do
27
27
  subject.run do
28
- element :foo
28
+ add :foo
29
29
  end
30
30
  subject.added_elements.keys.should include(:foo)
31
31
  end
@@ -34,7 +34,7 @@ describe Schematic::Generator::Sandbox do
34
34
  context "nesting elements" do
35
35
  it "should add the method to the element list" do
36
36
  subject.run do
37
- element :foo => { :bar => nil }
37
+ add :foo => { :bar => nil }
38
38
  end
39
39
  subject.added_elements[:foo].should == { :bar => nil }
40
40
  end
@@ -43,7 +43,7 @@ describe Schematic::Generator::Sandbox do
43
43
  context "sequence of subelements" do
44
44
  it "should add the method to the element list" do
45
45
  subject.run do
46
- element :foo => [:bar]
46
+ add :foo => [:bar]
47
47
  end
48
48
  subject.added_elements[:foo].should == [:bar]
49
49
  end
@@ -8,7 +8,7 @@ describe Schematic::Serializers::Xsd do
8
8
 
9
9
  model do
10
10
  schematic do
11
- element :foo_bar
11
+ add :foo_bar
12
12
  end
13
13
  end
14
14
  end
@@ -59,7 +59,7 @@ describe Schematic::Serializers::Xsd do
59
59
  end
60
60
 
61
61
  schematic do
62
- element :foo_bar
62
+ add :foo_bar
63
63
  end
64
64
  end
65
65
  end
@@ -122,7 +122,7 @@ describe Schematic::Serializers::Xsd do
122
122
  end
123
123
 
124
124
  schematic do
125
- element :bar
125
+ add :bar
126
126
  end
127
127
 
128
128
  def to_xml(options = {})
@@ -192,7 +192,7 @@ describe Schematic::Serializers::Xsd do
192
192
  end
193
193
 
194
194
  schematic do
195
- element :foo => [:foo]
195
+ add :foo => [:foo]
196
196
  end
197
197
 
198
198
  def to_xml(options = {})
@@ -256,8 +256,8 @@ describe Schematic::Serializers::Xsd do
256
256
 
257
257
  model do
258
258
  schematic do
259
- element :foo => { :bar => { :baz => nil } }
260
- element :quz
259
+ add :foo => { :bar => { :baz => nil } }
260
+ add :quz
261
261
  end
262
262
  end
263
263
  end
@@ -35,9 +35,9 @@ describe Schematic::Serializers::Xsd do
35
35
  validates :some_datetime, :presence => true, :allow_blank => false
36
36
  attr_accessor :additional_method_array
37
37
  schematic do
38
- element :foo => { :bar => { :baz => nil }, :quz => [:qaz] }
39
- element :method_is_also_columns => [:method_is_also_column]
40
- element :additional_method_array => []
38
+ add :foo => { :bar => { :baz => nil }, :quz => [:qaz] }
39
+ add :method_is_also_columns => [:method_is_also_column]
40
+ add :additional_method_array => []
41
41
  end
42
42
 
43
43
  def to_xml(options)
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: schematic
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.1
5
+ version: 0.4.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Case Commons, LLC
@@ -156,7 +156,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - ">="
158
158
  - !ruby/object:Gem::Version
159
- hash: -2689191166549575176
159
+ hash: 1048090237494519988
160
160
  segments:
161
161
  - 0
162
162
  version: "0"
@@ -165,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
165
  requirements:
166
166
  - - ">="
167
167
  - !ruby/object:Gem::Version
168
- hash: -2689191166549575176
168
+ hash: 1048090237494519988
169
169
  segments:
170
170
  - 0
171
171
  version: "0"