lib/koine/attributes.rb in koine-attributes-1.0.0 vs lib/koine/attributes.rb in koine-attributes-1.1.0
- old
+ new
@@ -1,7 +1,8 @@
require 'koine/attributes/version'
require 'koine/attributes/adapter/base'
+require 'koine/attributes/argument_error'
# provides the following API
#
# @example using attributes
# class Person
@@ -137,10 +138,10 @@
private :attributes
define_method(:initialize) { |*args| attributes.initialize_values(*args) }
define_method(:inspect) do
- hex_id = '%x' % (object_id << 1)
+ hex_id = format('%x', (object_id << 1))
"#<#{self.class}:0x00#{hex_id} @attributes=#{attributes.to_h.inspect}>"
end
end
@_attributes_factory.freeze