Sha256: fe0cfae737a3fcc9837f1535c0d8c729ec28cc61fb40890e33b510672c50141c

Contents?: true

Size: 918 Bytes

Versions: 13

Compression:

Stored size: 918 Bytes

Contents

module Mobility
  module Backends
    module Sequel
      def self.included(backend_class)
        backend_class.include(Backend)
        backend_class.extend(ClassMethods)
      end

      module ClassMethods
        # @param [Symbol] name Attribute name
        # @param [Symbol] locale Locale
        def [](name, locale)
          build_op(name.to_s, locale)
        end

        # @param [String] _attr Attribute name
        # @param [Symbol] _locale Locale
        # @return Op for this translated attribute
        def build_op(_attr, _locale)
          raise NotImplementedError
        end

        # @param [Sequel::Dataset] dataset Dataset to prepare
        # @param [Object] predicate Predicate
        # @param [Symbol] locale Locale
        # @return [Sequel::Dataset] Prepared dataset
        def prepare_dataset(dataset, _predicate, _locale)
          dataset
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
mobility-0.8.13 lib/mobility/backends/sequel.rb
mobility-0.8.11 lib/mobility/backends/sequel.rb
mobility-0.8.10 lib/mobility/backends/sequel.rb
mobility-0.8.9 lib/mobility/backends/sequel.rb
mobility-0.8.8 lib/mobility/backends/sequel.rb
mobility-0.8.7 lib/mobility/backends/sequel.rb
mobility-0.8.6 lib/mobility/backends/sequel.rb
mobility-0.8.5 lib/mobility/backends/sequel.rb
mobility-0.8.4 lib/mobility/backends/sequel.rb
mobility-0.8.3 lib/mobility/backends/sequel.rb
mobility-0.8.2 lib/mobility/backends/sequel.rb
mobility-0.8.1 lib/mobility/backends/sequel.rb
mobility-0.8.0 lib/mobility/backends/sequel.rb