Sha256: d057c0a334c60a3ee2a36cb4bbb2f51a193e4cc0470623d621c7d0ece93b919b

Contents?: true

Size: 875 Bytes

Versions: 2

Compression:

Stored size: 875 Bytes

Contents

module Scenic
  module Generators
    # @api private
    module Materializable
      extend ActiveSupport::Concern

      included do
        class_option :materialized,
          type: :boolean,
          required: false,
          desc: "Makes the view materialized",
          default: false
        class_option :no_data,
          type: :boolean,
          required: false,
          desc: "Adds WITH NO DATA when materialized view creates/updates",
          default: false
        class_option :replace,
          type: :boolean,
          required: false,
          desc: "Uses replace_view instead of update_view",
          default: false
      end

      private

      def materialized?
        options[:materialized]
      end

      def replace_view?
        options[:replace]
      end

      def no_data?
        options[:no_data]
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
scenic-1.8.0 lib/generators/scenic/materializable.rb
scenic-1.7.0 lib/generators/scenic/materializable.rb