Method: Weblate::Memory#list_invalid_properties

Defined in:
lib/weblate/models/memory.rb

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# File 'lib/weblate/models/memory.rb', line 144

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  if @id.nil?
    invalid_properties.push('invalid value for "id", id cannot be nil.')
  end

  if @source.nil?
    invalid_properties.push('invalid value for "source", source cannot be nil.')
  end

  if @target.nil?
    invalid_properties.push('invalid value for "target", target cannot be nil.')
  end

  if @source_language.nil?
    invalid_properties.push('invalid value for "source_language", source_language cannot be nil.')
  end

  if @target_language.nil?
    invalid_properties.push('invalid value for "target_language", target_language cannot be nil.')
  end

  if @origin.nil?
    invalid_properties.push('invalid value for "origin", origin cannot be nil.')
  end

  invalid_properties
end