Sha256: e33a16442b1f6fe8e7f2044fb58487b8f159316fd9d79d0332168211ef04a8be
Contents?: true
Size: 655 Bytes
Versions: 12
Compression:
Stored size: 655 Bytes
Contents
# frozen_string_literal: true module ActiveTriples ## # An error class to be raised when attempting to reflect on an undefined # property. # # @example # begin # my_source.set_value(:fake_property, 'blah') # rescue ActiveTriples::UndefinedPropertyError => e # e.property => 'fake_property' # e.klass => 'MySourceClass' # end # class UndefinedPropertyError < ArgumentError attr_reader :property, :klass def initialize(property, klass) @property = property @klass = klass end def message "The property `#{@property}` is not defined on class '#{@klass}'" end end end
Version data entries
12 entries across 12 versions & 1 rubygems