Sha256: 9e72449d0702abf77bdc82cbb76d24302c84c9de7beac4a26cb31cc64451e73a

Contents?: true

Size: 1.17 KB

Versions: 21

Compression:

Stored size: 1.17 KB

Contents

module Redcar
  class Document
    # Abstract interface. A Mirror allows an EditView contents to reflect 
    # some other resource. They have methods for loading the contents from the 
    # resource and commiting changes.
    #
    # Events: changed
    module Mirror
      include Redcar::Observable
      
      # Return the title of the resource. (e.g. the filename)
      def title
        raise "not implemented"
      end
      
      # Return the contents of the resource reflected by this mirror. 
      # (E.g. the contents of the file)
      def read
        raise "not implemented"
      end

      # Does the resource still exist or not? (E.g. does the file exist?)
      def exists?
        raise "not implemented"
      end
      
      # Has the resource changed since the last time either `read` or `commit` 
      # were was called? (E.g. has the file changed since the last time its 
      # contents were loaded)
      def changed?
        raise "not implemented"
      end
      
      # Replace the contents of the resource with `contents`. (E.g. save the
      # new contents of the file.)
      def commit(contents)
        raise "not implemented"
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
redcar-0.3.10.1dev plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-0.3.10.0dev plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-0.3.9 plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-0.3.9.0dev plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-0.3.8.4 plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-0.3.8.3 plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-0.3.8.2 plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-0.3.8.1 plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-0.3.8 plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-0.3.7.1 plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-0.3.7 plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-0.3.6 plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-0.3.5 plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-0.3.4.3 plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-0.3.4.2 plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-0.3.4.1 plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-0.3.4 plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-0.3.3 plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-0.3.2dev plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-0.3.1dev plugins/edit_view/lib/edit_view/document/mirror.rb