Class: Camouflage::CamouflageUploader

Inherits:
CarrierWave::Uploader::Base
  • Object
show all
Includes:
CarrierWave::MiniMagick
Defined in:
lib/camouflage.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ CamouflageUploader

Returns a new instance of CamouflageUploader.



45
46
47
48
49
50
51
# File 'lib/camouflage.rb', line 45

def initialize(options = {})
  @blur_radius = options.fetch(:blur_radius, 0)
  @blur_sigma = options.fetch(:blur_sigma, 30)
  @width = options.fetch(:width, 300)
  @height = options.fetch(:height, 300)
  super(nil, nil)
end

Instance Attribute Details

#blur_radiusObject

Returns the value of attribute blur_radius.



43
44
45
# File 'lib/camouflage.rb', line 43

def blur_radius
  @blur_radius
end

#blur_sigmaObject

Returns the value of attribute blur_sigma.



43
44
45
# File 'lib/camouflage.rb', line 43

def blur_sigma
  @blur_sigma
end

#heightObject

Returns the value of attribute height.



43
44
45
# File 'lib/camouflage.rb', line 43

def height
  @height
end

#widthObject

Returns the value of attribute width.



43
44
45
# File 'lib/camouflage.rb', line 43

def width
  @width
end

Instance Method Details

#store_dirObject



53
54
55
# File 'lib/camouflage.rb', line 53

def store_dir
  '/tmp'
end