- Timestamp:
- Aug 14, 2009, 8:11:44 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/branches/0.5/lib/open_ehr/rm/data_structures/item_structure.rb
r194 r195 32 32 attr_accessor :items 33 33 34 def initialize(args = {}) 35 super(args) 36 self.items = args[:items] 37 end 38 34 39 def item_count 35 40 unless @items.nil? … … 39 44 end 40 45 end 46 47 def names 48 return @items.collect{|item| item.name} 49 end 50 51 def named_item(a_name) 52 @items.each do |item| 53 return item if item.name.value == a_name 54 end 55 retrun nil 56 end 57 58 def ith_item(i) 59 return @items[i] 60 end 61 62 def as_hierarchy 63 return Cluster.new(:name => @name, 64 :archetype_node_id => @archetype_node_id, 65 :items => @items) 66 end 41 67 end 42 68 end # of ItemStructure
Note:
See TracChangeset
for help on using the changeset viewer.