Exception: ASpaceImport::Utils::ASpaceImportException

Inherits:
StandardError
  • Object
show all
Defined in:
backend/app/converters/lib/utils.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ ASpaceImportException

Returns a new instance of ASpaceImportException.



175
176
177
178
179
# File 'backend/app/converters/lib/utils.rb', line 175

def initialize(opts)
  @property = opts[:property]
  @val_type = opts[:val_type]
  @property_def = opts[:property_def]
end

Instance Attribute Details

#propertyObject

Returns the value of attribute property



171
172
173
# File 'backend/app/converters/lib/utils.rb', line 171

def property
  @property
end

#property_defObject

Returns the value of attribute property_def



173
174
175
# File 'backend/app/converters/lib/utils.rb', line 173

def property_def
  @property_def
end

#val_typeObject

Returns the value of attribute val_type



172
173
174
# File 'backend/app/converters/lib/utils.rb', line 172

def val_type
  @val_type
end

Instance Method Details

#to_sObject



181
182
183
184
185
186
187
188
189
# File 'backend/app/converters/lib/utils.rb', line 181

def to_s
  if @property_def
    "#<:ASpaceImportException: Can't classify the property schema: #{property_def.inspect}>"
  elsif @val_type
    "#<:ASpaceImportException: Can't identify a Model for property '#{property}' of type '#{val_type}'>"
  else
    "#<:ASpaceImportException: Can't identify a schema fragment for property '#{property}'>"
  end
end