Module: Attachie
- Defined in:
- lib/attachie.rb,
lib/attachie/version.rb,
lib/attachie/s3_driver.rb,
lib/attachie/fake_driver.rb,
lib/attachie/file_driver.rb,
lib/attachie/interpolation.rb
Defined Under Namespace
Modules: ClassMethods
Classes: Attachment, FakeDriver, FakeMultipartUpload, FileDriver, Interpolation, InterpolationError, NoSuchVersion, NotSupported, S3Driver, S3MultipartUpload, UnknownAttachment
Constant Summary
collapse
- VERSION =
"1.2.1"
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.default_options ⇒ Object
12
13
14
|
# File 'lib/attachie.rb', line 12
def self.default_options
@default_options ||= { :protocol => "http" }
end
|
.included(base) ⇒ Object
152
153
154
155
156
157
|
# File 'lib/attachie.rb', line 152
def self.included(base)
base.class_attribute :attachments
base.attachments = {}
base.extend ClassMethods
end
|
Instance Method Details
#attachment(name) ⇒ Object
159
160
161
162
163
164
165
|
# File 'lib/attachie.rb', line 159
def attachment(name)
definition = self.class.attachments[name]
raise(UnknownAttachment) unless definition
Attachment.new(self, name, definition)
end
|