class Object
Public Class Methods
name()
click to toggle source
# File spec/refile/attachment/active_record_spec.rb, line 14 def self.name "Post" end
new(attributes)
click to toggle source
# File spec/refile/attachment_spec.rb, line 615 def initialize(attributes) @documents = attributes[:documents] end
Public Instance Methods
app()
click to toggle source
# File spec/refile/app_spec.rb, line 6 def app res = Refile::App.new res.settings.set :public_folder, "" res end
close()
click to toggle source
# File lib/refile/rails.rb, line 50 def close @tempfile.close end
eof?()
click to toggle source
# File lib/refile/rails.rb, line 44 def eof? @tempfile.eof? end
get(id)
click to toggle source
# File spec/refile/backend_macros_spec.rb, line 12 def get(id) id end
save!()
click to toggle source
# File spec/refile/attachment_spec.rb, line 619 def save!; end
update_attributes!(attributes)
click to toggle source
# File spec/refile/attachment_spec.rb, line 621 def update_attributes!(attributes) attributes.each { |k, v| public_send("#{k}=", v) } end
upload(uploadable)
click to toggle source
# File spec/refile/backend_macros_spec.rb, line 8 def upload(uploadable) uploadable end
uploadable(data = "hello")
click to toggle source
# File spec/refile/backend_examples.rb, line 2 def uploadable(data = "hello") Refile::FileDouble.new(data) end