class Attachie::Attachment
Attributes
name[RW]
object[RW]
options[RW]
Public Class Methods
new(object, name, options)
click to toggle source
# File lib/attachie.rb, line 121 def initialize(object, name, options) self.object = object self.name = name self.options = options end
Public Instance Methods
inspect()
click to toggle source
# File lib/attachie.rb, line 147 def inspect to_s end
method_missing(method_name, *args, &block)
click to toggle source
Calls superclass method
# File lib/attachie.rb, line 137 def method_missing(method_name, *args, &block) return options[method_name.to_sym] if options.key?(method_name.to_sym) super end
respond_to_missing?(method_name, *args)
click to toggle source
# File lib/attachie.rb, line 143 def respond_to_missing?(method_name, *args) options.key?(method_name.to_sym) end
version(version_name, opts = {})
click to toggle source
# File lib/attachie.rb, line 127 def version(version_name, opts = {}) raise(NoSuchVersion, "No such version: #{version_name}") unless options[:versions][version_name] Version.new self, version_name, opts end
versions()
click to toggle source
# File lib/attachie.rb, line 133 def versions options[:versions].collect { |version_name, _| version version_name } end