Sha256: 46f57021f8ff04ce025727728f1549ba6200447a24c7e2bc64bace6746a54175

Contents?: true

Size: 490 Bytes

Versions: 21

Compression:

Stored size: 490 Bytes

Contents

module Mobility
  module Sequel
=begin

Backend resetter for Sequel models. Triggers backend reset when +refresh+
method is called.

=end
    class BackendResetter < Mobility::BackendResetter

      # (see Mobility::BackendResetter#initialize)
      def initialize(attribute_names, &block)
        super

        model_reset_method = @model_reset_method

        define_method :refresh do
          super().tap { instance_eval(&model_reset_method) }
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
mobility-0.8.13 lib/mobility/sequel/backend_resetter.rb
mobility-0.8.11 lib/mobility/sequel/backend_resetter.rb
mobility-0.8.10 lib/mobility/sequel/backend_resetter.rb
mobility-0.8.9 lib/mobility/sequel/backend_resetter.rb
mobility-0.8.8 lib/mobility/sequel/backend_resetter.rb
mobility-0.8.7 lib/mobility/sequel/backend_resetter.rb
mobility-0.8.6 lib/mobility/sequel/backend_resetter.rb
mobility-0.8.5 lib/mobility/sequel/backend_resetter.rb
mobility-0.8.4 lib/mobility/sequel/backend_resetter.rb
mobility-0.8.3 lib/mobility/sequel/backend_resetter.rb
mobility-0.8.2 lib/mobility/sequel/backend_resetter.rb
mobility-0.8.1 lib/mobility/sequel/backend_resetter.rb
mobility-0.8.0 lib/mobility/sequel/backend_resetter.rb
mobility-0.7.6 lib/mobility/sequel/backend_resetter.rb
mobility-0.7.5 lib/mobility/sequel/backend_resetter.rb
mobility-0.7.4 lib/mobility/sequel/backend_resetter.rb
mobility-0.7.3 lib/mobility/sequel/backend_resetter.rb
mobility-0.7.2 lib/mobility/sequel/backend_resetter.rb
mobility-0.7.1 lib/mobility/sequel/backend_resetter.rb
mobility-0.7.0 lib/mobility/sequel/backend_resetter.rb