Changeset 7 for ruby/trunk/models/rm/common
- Timestamp:
- Feb 13, 2008, 8:31:25 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/trunk/models/rm/common/archetyped.rb
r4 r7 30 30 raise NotImplementError, "path_unique must be implemented" 31 31 end 32 module32 end 33 33 class Locatable < Pathable 34 34 include Locater_Constants … … 38 38 feeder_audit, links, parent) 39 39 super(parent) 40 if archetype_node_id == nil40 if archetype_node_id.nil? 41 41 raise ArgumentError, "null archetype_node_id" 42 42 end 43 if name == nil43 if name.nil? 44 44 raise ArgumentError, "name is empty" 45 45 end 46 if links == nil46 if links.nil? 47 47 raise ArgumentError, "links is empty" 48 48 end … … 54 54 end 55 55 def item_at_path(path) 56 if @path == nil 57 56 if !@path.nil? 57 if @path == "" 58 raise ArgumentError, "path is not valid" 59 end 60 end 58 61 end 59 def items_at_path 62 def items_at_path(path) 60 63 raise NotImplementError, "items_at_path must be implemented" 61 64 end … … 69 72 end 70 73 def is_archetype_root? 71 archetype_details != nil74 !archetype_details.nil? 72 75 end 73 76 end
Note:
See TracChangeset
for help on using the changeset viewer.