Class: Strict::InitializationError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(initializable_class:, remaining_attributes:, invalid_attributes:, missing_attributes:) ⇒ InitializationError

rubocop:disable Metrics/MethodLength



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/strict/initialization_error.rb', line 7

def initialize(initializable_class:, remaining_attributes:, invalid_attributes:, missing_attributes:) # rubocop:disable Metrics/MethodLength
  super(
    message_from(
      initializable_class: initializable_class,
      remaining_attributes: remaining_attributes,
      invalid_attributes: invalid_attributes,
      missing_attributes: missing_attributes
    )
  )

  @remaining_attributes = remaining_attributes
  @invalid_attributes = invalid_attributes
  @missing_attributes = missing_attributes
end

Instance Attribute Details

#invalid_attributesObject (readonly)

Returns the value of attribute invalid_attributes.



5
6
7
# File 'lib/strict/initialization_error.rb', line 5

def invalid_attributes
  @invalid_attributes
end

#missing_attributesObject (readonly)

Returns the value of attribute missing_attributes.



5
6
7
# File 'lib/strict/initialization_error.rb', line 5

def missing_attributes
  @missing_attributes
end

#remaining_attributesObject (readonly)

Returns the value of attribute remaining_attributes.



5
6
7
# File 'lib/strict/initialization_error.rb', line 5

def remaining_attributes
  @remaining_attributes
end