Module: Ea::Sources::Qea::IdNormalizer
- Defined in:
- lib/ea/sources/qea/id_normalizer.rb
Overview
Normalizes EA's identifier formats into stable strings used
as Ea::Model element ids. EA represents identity as
{GUID} strings. We strip the braces to give the bare GUID.
Class Method Summary collapse
Class Method Details
.from_guid(ea_guid) ⇒ Object
12 13 14 15 16 |
# File 'lib/ea/sources/qea/id_normalizer.rb', line 12 def from_guid(ea_guid) return nil if ea_guid.nil? || ea_guid.empty? ea_guid.to_s.gsub(/[{}]/, "") end |
.synthetic(prefix, *parts) ⇒ Object
18 19 20 |
# File 'lib/ea/sources/qea/id_normalizer.rb', line 18 def synthetic(prefix, *parts) "#{prefix}:#{parts.join(":")}" end |