Exception: Structify::RemovedFieldError

Inherits:
Error
  • Object
show all
Defined in:
lib/structify.rb

Overview

Error raised when trying to access a field that has been removed in the current schema version

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(field_name, removed_in_version) ⇒ RemovedFieldError

Returns a new instance of RemovedFieldError.



73
74
75
76
77
78
79
80
81
# File 'lib/structify.rb', line 73

def initialize(field_name, removed_in_version)
  @field_name = field_name
  @removed_in_version = removed_in_version
  
  message = "Field '#{field_name}' has been removed in version #{removed_in_version}. " \
            "This field is no longer available in the current schema."
  
  super(message)
end

Instance Attribute Details

#field_nameObject (readonly)

Returns the value of attribute field_name.



71
72
73
# File 'lib/structify.rb', line 71

def field_name
  @field_name
end

#removed_in_versionObject (readonly)

Returns the value of attribute removed_in_version.



71
72
73
# File 'lib/structify.rb', line 71

def removed_in_version
  @removed_in_version
end