Class: AnotherUploader::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/another_uploader/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/another_uploader/configuration.rb', line 20

def initialize
  @enable_s3 = false
  @s3_no_wait = false
  @keep_local_file = true
  @enable_nonimage_processing = false
  @temp_dir = Dir::tmpdir
  @use_http_status_failures = false
  @has_attached_file_options = {
    url: "/system/:attachment/:id_partition/:style/:filename",
    path: ":rails_root/public:url", 
    styles: { icon: "30x30!", thumb: "100>", small: "150>", medium: "300>", large: "660>" },
    default_url: "/images/default.jpg",
    convert_options: { all: '-quality 80' }
  }
end

Instance Attribute Details

#enable_nonimage_processingObject

Returns the value of attribute enable_nonimage_processing.



16
17
18
# File 'lib/another_uploader/configuration.rb', line 16

def enable_nonimage_processing
  @enable_nonimage_processing
end

#enable_s3Object

Returns the value of attribute enable_s3.



13
14
15
# File 'lib/another_uploader/configuration.rb', line 13

def enable_s3
  @enable_s3
end

#has_attached_file_optionsObject

Returns the value of attribute has_attached_file_options.



12
13
14
# File 'lib/another_uploader/configuration.rb', line 12

def has_attached_file_options
  @has_attached_file_options
end

#keep_local_fileObject

Returns the value of attribute keep_local_file.



15
16
17
# File 'lib/another_uploader/configuration.rb', line 15

def keep_local_file
  @keep_local_file
end

#s3_no_waitObject

Returns the value of attribute s3_no_wait.



14
15
16
# File 'lib/another_uploader/configuration.rb', line 14

def s3_no_wait
  @s3_no_wait
end

#temp_dirObject

Returns the value of attribute temp_dir.



17
18
19
# File 'lib/another_uploader/configuration.rb', line 17

def temp_dir
  @temp_dir
end

#use_http_status_failuresObject

Returns the value of attribute use_http_status_failures.



18
19
20
# File 'lib/another_uploader/configuration.rb', line 18

def use_http_status_failures
  @use_http_status_failures
end