Changeset 340 for ruby/branches/0.5/lib/open_ehr
- Timestamp:
- Nov 10, 2009, 10:45:54 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/branches/0.5/lib/open_ehr/rm/data_structures/item_structure.rb
r339 r340 186 186 self.items = args[:items] 187 187 end 188 189 def has_element_path?(path) 190 paths = [ ] 191 @items.each do |item| 192 paths << item.archetype_node_id 193 end 194 return paths.include? path 195 end 196 197 def element_at_path(path) 198 @items.each do |item| 199 return item if item.archetype_node_id == path 200 end 201 return nil 202 end 203 204 def as_hierarchy 205 return Cluster.new(:name => @name, 206 :archetype_node_id => @archetype_node_id, 207 :items => @items) 208 end 188 209 end 189 210 end # of ItemStructure
Note:
See TracChangeset
for help on using the changeset viewer.