[BioRuby-cvs] bioruby/lib/bio map.rb,1.2,1.3

Jan Aerts aerts at dev.open-bio.org
Thu May 4 13:59:20 UTC 2006


Update of /home/repository/bioruby/bioruby/lib/bio
In directory dev.open-bio.org:/tmp/cvs-serv19198

Modified Files:
	map.rb 
Log Message:
Changed names of add_mapping methods in Bio::Map::ActsLikeMap and Bio::Map::ActsLikeMarker
to prevent naming conflicts for classes that would mix in both modules.


Index: map.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/map.rb,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** map.rb	4 May 2006 13:36:16 -0000	1.2
--- map.rb	4 May 2006 13:59:18 -0000	1.3
***************
*** 79,83 ****
        # * _location_: location of mapping. Should be a _string_, not a _number_.
        # *Returns*:: itself
!       def add_mapping(marker, location = nil)
          unless marker.class.include?(Bio::Map::ActsLikeMarker)
            raise "[Error] marker is not object that implements Bio::Map::ActsLikeMarker"
--- 79,83 ----
        # * _location_: location of mapping. Should be a _string_, not a _number_.
        # *Returns*:: itself
!       def add_mapping_to_marker(marker, location = nil)
          unless marker.class.include?(Bio::Map::ActsLikeMarker)
            raise "[Error] marker is not object that implements Bio::Map::ActsLikeMarker"
***************
*** 139,143 ****
        # * _location_: location of mapping. Should be a _string_, not a _number_.
        # *Returns*:: itself
!       def add_mapping (map, location = nil)
          unless map.class.include?(Bio::Map::ActsLikeMap)
            raise "[Error] map is not object that implements Bio::Map::ActsLikeMap"
--- 139,143 ----
        # * _location_: location of mapping. Should be a _string_, not a _number_.
        # *Returns*:: itself
!       def add_mapping_to_map(map, location = nil)
          unless map.class.include?(Bio::Map::ActsLikeMap)
            raise "[Error] map is not object that implements Bio::Map::ActsLikeMap"
***************
*** 288,294 ****
    my_map2 = Bio::Map::SimpleMap.new('consensus', 'linkage', 'cM')
  
!   my_map1.add_mapping(my_marker1, '17')
!   my_map1.add_mapping(Bio::Map::Marker.new('marker2'), '5')
!   my_marker3.add_mapping(my_map1, '9')
  
  
--- 288,294 ----
    my_map2 = Bio::Map::SimpleMap.new('consensus', 'linkage', 'cM')
  
!   my_map1.add_mapping_to_marker(my_marker1, '17')
!   my_map1.add_mapping_to_marker(Bio::Map::Marker.new('marker2'), '5')
!   my_marker3.add_mapping_to_map(my_map1, '9')
  
  




More information about the bioruby-cvs mailing list