noesya/osuny

View on GitHub
app/services/contact_details.rb

Summary

Maintainability
A
0 mins
Test Coverage
B
80%
class ContactDetails
  def self.with_kind(kind)
    "ContactDetails::#{kind.to_s.camelize}".constantize
  end

  def self.for(kind, string)
    with_kind(kind).new(string)
  end
end