Sha256: c7a4b1d1f79181183c051c2a030ada5bacd03422150e78d9ad5039eb681366ef

Contents?: true

Size: 1.17 KB

Versions: 57

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: change
    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

57 entries across 57 versions & 2 rubygems

Version Path
redcar-0.13 plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-dev-0.13.5dev plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-dev-0.13.4dev plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-dev-0.13.3dev plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-dev-0.13.2dev plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-dev-0.13.1dev plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-0.12.1 plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-dev-0.13.0dev plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-0.12 plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-dev-0.12.27dev plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-dev-0.12.26dev plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-dev-0.12.25dev plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-dev-0.12.24dev plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-dev-0.12.23dev plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-dev-0.12.22dev plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-dev-0.12.21dev plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-dev-0.12.20dev plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-dev-0.12.19dev plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-dev-0.12.18dev plugins/edit_view/lib/edit_view/document/mirror.rb
redcar-dev-0.12.17dev plugins/edit_view/lib/edit_view/document/mirror.rb