Changeset 376 for ruby/trunk/lib
- Timestamp:
- Dec 20, 2009, 6:46:26 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/trunk/lib/open_ehr/am/archetype/constraint_model.rb
r375 r376 223 223 224 224 class CSingleAttribute < CAttribute 225 attr_accessor :alternatives 226 227 def initialize(args = { }) 228 @alternatives = args[:alternatives] ? args[:alternatives] : [] 229 super 225 attr_reader :alternatives 226 227 def initialize(args = { }) 228 super 229 self.alternatives = args[:alternatives] 230 end 231 232 def alternatives=(alternatives) 233 if alternatives.nil? 234 raise ArgumentError, 'alternatives are mandatory' 235 end 236 @alternatives = alternatives 230 237 end 231 238 end
Note:
See TracChangeset
for help on using the changeset viewer.