Class: Lutaml::Model::MixedContentCollectionError
- Defined in:
- lib/lutaml/model/error/mixed_content_collection_error.rb
Instance Method Summary collapse
-
#initialize(attr_name, model_class) ⇒ MixedContentCollectionError
constructor
A new instance of MixedContentCollectionError.
- #to_s ⇒ Object
Constructor Details
#initialize(attr_name, model_class) ⇒ MixedContentCollectionError
Returns a new instance of MixedContentCollectionError.
4 5 6 7 8 9 |
# File 'lib/lutaml/model/error/mixed_content_collection_error.rb', line 4 def initialize(attr_name, model_class) @attr_name = attr_name @model_class = model_class super() end |
Instance Method Details
#to_s ⇒ Object
11 12 13 14 |
# File 'lib/lutaml/model/error/mixed_content_collection_error.rb', line 11 def to_s "Mixed content requires `#{@attr_name}` to be a string collection in #{@model_class}. " \ "Use `attribute :#{@attr_name}, :string, collection: true` when `mixed_content` is enabled." end |