Class: Alchemy::StorageAdapter
- Inherits:
-
Object
- Object
- Alchemy::StorageAdapter
show all
- Defined in:
- app/models/alchemy/storage_adapter.rb,
app/models/alchemy/storage_adapter/dragonfly.rb,
app/models/alchemy/storage_adapter/active_storage.rb,
app/models/alchemy/storage_adapter/dragonfly/picture_url.rb,
app/models/alchemy/storage_adapter/dragonfly/preprocessor.rb,
app/models/alchemy/storage_adapter/dragonfly/attachment_url.rb,
app/models/alchemy/storage_adapter/active_storage/picture_url.rb,
app/models/alchemy/storage_adapter/active_storage/preprocessor.rb,
app/models/alchemy/storage_adapter/active_storage/attachment_url.rb
Defined Under Namespace
Modules: ActiveStorage, Dragonfly
Classes: UnknownAdapterError
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
35
36
37
38
|
# File 'app/models/alchemy/storage_adapter.rb', line 35
def initialize(name)
@name = name.to_sym
@adapter = adapter_class
end
|
Instance Attribute Details
#adapter ⇒ Object
Returns the value of attribute adapter.
5
6
7
|
# File 'app/models/alchemy/storage_adapter.rb', line 5
def adapter
@adapter
end
|
#name ⇒ Object
Returns the value of attribute name.
5
6
7
|
# File 'app/models/alchemy/storage_adapter.rb', line 5
def name
@name
end
|
Instance Method Details
#==(other) ⇒ Object
40
41
42
|
# File 'app/models/alchemy/storage_adapter.rb', line 40
def ==(other)
name == other.to_sym
end
|
#active_storage? ⇒ Boolean
44
45
46
|
# File 'app/models/alchemy/storage_adapter.rb', line 44
def active_storage?
name == :active_storage
end
|
#attachment_class_methods ⇒ Object
56
57
58
|
# File 'app/models/alchemy/storage_adapter.rb', line 56
def attachment_class_methods
adapter::AttachmentClassMethods
end
|
#dragonfly? ⇒ Boolean
48
49
50
|
# File 'app/models/alchemy/storage_adapter.rb', line 48
def dragonfly?
name == :dragonfly
end
|
#picture_class_methods ⇒ Object
52
53
54
|
# File 'app/models/alchemy/storage_adapter.rb', line 52
def picture_class_methods
adapter::PictureClassMethods
end
|