1
0

glue.rb 338 B

1234567891011121314151617181920212223
  1. # frozen_string_literal: true
  2. module UserSettings::Glue
  3. def to_model
  4. self
  5. end
  6. def to_key
  7. ''
  8. end
  9. def persisted?
  10. false
  11. end
  12. def type_for_attribute(key)
  13. self.class.definition_for(key)&.type
  14. end
  15. def has_attribute?(key) # rubocop:disable Naming/PredicateName
  16. self.class.definition_for?(key)
  17. end
  18. end