aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/chouette/object_id.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/chouette/object_id.rb')
-rw-r--r--app/models/chouette/object_id.rb36
1 files changed, 0 insertions, 36 deletions
diff --git a/app/models/chouette/object_id.rb b/app/models/chouette/object_id.rb
deleted file mode 100644
index 0b122c91b..000000000
--- a/app/models/chouette/object_id.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-class Chouette::ObjectId < String
-
- def valid?
- parts.present?
- end
- alias_method :objectid?, :valid?
-
- @@format = /^([0-9A-Za-z_]+):([A-Za-z]+):([0-9A-Za-z_-]+)$/
- cattr_reader :format
-
- def parts
- match(format).try(:captures)
- end
-
- def system_id
- parts.try(:first)
- end
-
- def object_type
- parts.try(:second)
- end
-
- def local_id
- parts.try(:third)
- end
-
- def self.create(system_id, object_type, local_id)
- new [system_id, object_type, local_id].join(":")
- end
-
- def self.new(string)
- string ||= ""
- self === string ? string : super
- end
-
-end