Exception: Holotype::MissingRequiredAttributesError
- Inherits:
-
StandardError
- Object
- StandardError
- Holotype::MissingRequiredAttributesError
- Defined in:
- lib/holotype/missing_required_attributes_error.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#original_class ⇒ Object
readonly
Returns the value of attribute original_class.
Instance Method Summary collapse
-
#initialize(original_class, attributes) ⇒ MissingRequiredAttributesError
constructor
A new instance of MissingRequiredAttributesError.
- #message ⇒ Object
Constructor Details
#initialize(original_class, attributes) ⇒ MissingRequiredAttributesError
Returns a new instance of MissingRequiredAttributesError.
5 6 7 8 |
# File 'lib/holotype/missing_required_attributes_error.rb', line 5 def initialize original_class, attributes @attributes = attributes @original_class = original_class end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
3 4 5 |
# File 'lib/holotype/missing_required_attributes_error.rb', line 3 def attributes @attributes end |
#original_class ⇒ Object (readonly)
Returns the value of attribute original_class.
3 4 5 |
# File 'lib/holotype/missing_required_attributes_error.rb', line 3 def original_class @original_class end |
Instance Method Details
#message ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/holotype/missing_required_attributes_error.rb', line 10 def "Class `#{original_class.name}` requires the following attributes:" \ "#{format_list required_attributes}" \ "\n\n" \ "Missing attributes:" \ "#{format_list attributes}".freeze end |