lib/tori/file.rb in tori-0.6.2 vs lib/tori/file.rb in tori-0.6.3
- old
+ new
@@ -26,10 +26,11 @@
context.define_singleton_method(:__filename_callback__, filename_callback)
context.__filename_callback__(@model)
end
alias to_s name
+ attr_reader :from
def from?
!@from.nil?
end
def read
@@ -49,9 +50,13 @@
@filename_callback || Tori.config.filename_callback
end
def backend
@backend || Tori.config.backend
+ end
+
+ def backend=(new_backend)
+ @backend = new_backend
end
private
def respond_to_missing?(sym, include_private)