Sha256: 67f97065e63c8a543ed029730670a573cac158d3432a8ee2e65b4713bb79ca27

Contents?: true

Size: 740 Bytes

Versions: 2

Compression:

Stored size: 740 Bytes

Contents

require "attachment_magick/configuration/custom_style"

module AttachmentMagick
  class Configuration

    attr_accessor :columns_amount
    attr_accessor :columns_width
    attr_accessor :gutter
    attr_accessor :default_add_partial
    attr_accessor :orms

    def initialize
      @columns_amount         = 19
      @columns_width          = 54
      @gutter                 = 3
      @custom_styles          = []
      @orms                   = ["Mongoid"]
      @default_add_partial    = "/attachment_magick/add_image"
    end

    def custom_styles(&block)
      if block_given?
        @custom_styles = CustomStyle.new
        @custom_styles.instance_eval(&block)
      else
        return @custom_styles
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
attachment_magick-0.2.7 lib/attachment_magick/configuration/configuration.rb
attachment_magick-0.2.6 lib/attachment_magick/configuration/configuration.rb