Sha256: e9731dc10aed91520d5377cc7cdc1021e991dd2bf403cf30646506ebf1d4cb0c

Contents?: true

Size: 686 Bytes

Versions: 1

Compression:

Stored size: 686 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

    def initialize
      @columns_amount         = 19
      @columns_width          = 54
      @gutter                 = 3
      @custom_styles          = []
      @default_add_partial    = "layouts/attachment_magick/images/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

1 entries across 1 versions & 1 rubygems

Version Path
attachment_magick-0.1.0 lib/attachment_magick/configuration/configuration.rb