Sha256: 024422124cab21760de916bad15a7d55d71534d224c9b85afd5938fc8b4a0a7d

Contents?: true

Size: 561 Bytes

Versions: 2

Compression:

Stored size: 561 Bytes

Contents

module Bulldog
  module Attachment
    class None < Maybe
      handle :none

      #
      # Return true.  (Overrides ActiveSupport's Object#blank?)
      #
      # This means #present? will be false too.
      #
      def blank?
        true
      end

      def path(style_name = reflection.default_style)
        nil
      end

      def url(style_name = reflection.default_style)
        nil
      end

      def size
        nil
      end

      def save
      end

      def destroy
      end

      def process(event, *args)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bulldog-0.0.2 lib/bulldog/attachment/none.rb
bulldog-0.0.1 lib/bulldog/attachment/none.rb