openehr 1.2.10 → 1.2.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -111,19 +111,10 @@ module OpenEHR
111
111
  end
112
112
  @occurrences = occurrences
113
113
  end
114
-
115
- def self.create(args = { }, &block)
116
- c_object = new(args)
117
- if block_given?
118
- yield c_object
119
- end
120
- return c_object
121
- end
122
114
  end
123
115
 
124
116
  class CAttribute < ArchetypeConstraint
125
- attr_reader :rm_attribute_name, :existence
126
- attr_accessor :children
117
+ attr_reader :rm_attribute_name, :existence, :children
127
118
 
128
119
  def initialize(args = { })
129
120
  super(args)
@@ -145,6 +136,13 @@ module OpenEHR
145
136
  end
146
137
  @existence = existence
147
138
  end
139
+
140
+ def children=(children)
141
+ @children = children.inject([]) do |array, child|
142
+ child.parent=self
143
+ array << child
144
+ end if children
145
+ end
148
146
  end
149
147
 
150
148
  class CDefinedObject < CObject
@@ -211,14 +209,6 @@ module OpenEHR
211
209
  def any_allowed?
212
210
  return (@attributes.nil? or @attributes.empty?)
213
211
  end
214
-
215
- def self.create(args = { }, &block)
216
- c_complex_object = new(args)
217
- if block_given?
218
- yield c_complex_object
219
- end
220
- return c_complex_object
221
- end
222
212
  end
223
213
 
224
214
  class CDomainType < CDefinedObject
@@ -273,16 +263,6 @@ module OpenEHR
273
263
  def any_allowed?
274
264
  return includes.nil? && excludes.nil?
275
265
  end
276
-
277
- def self.create(args = { }, &block)
278
- archetype_slot = new(args)
279
- archetype_slot.includes = args[:includes]
280
- archetype_slot.excludes = args[:excludes]
281
- if block_given?
282
- yield archetype_slot
283
- end
284
- return archetype_slot
285
- end
286
266
  end
287
267
 
288
268
  class ConstraintRef < CReferenceObject
@@ -299,15 +279,6 @@ module OpenEHR
299
279
  end
300
280
  @reference = reference
301
281
  end
302
-
303
- def self.create(args = { }, &block)
304
- constraint_ref = new(args)
305
- constraint_ref.reference = args[:reference]
306
- if block_given?
307
- yield constraint_ref
308
- end
309
- return constraint_ref
310
- end
311
282
  end
312
283
 
313
284
  class CSingleAttribute < CAttribute
@@ -336,4 +307,3 @@ module OpenEHR
336
307
  end # of Archetype
337
308
  end # of AM
338
309
  end # of OpenEHR
339
-
@@ -550,7 +550,7 @@ module OpenEHR
550
550
  child_node = ArchetypeNode.new(node)
551
551
  child_node.path = val.path
552
552
  val.children = c_attr_body.value(child_node)
553
- val
553
+ val
554
554
  end
555
555
  }
556
556
  end
@@ -1,3 +1,3 @@
1
1
  module OpenEHR
2
- VERSION = "1.2.10"
2
+ VERSION = "1.2.11"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openehr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.10
4
+ version: 1.2.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2013-05-22 00:00:00.000000000 Z
16
+ date: 2013-05-23 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: rake