Sha256: 9542bba1177c58c4fd4cbb14639b2087913e6e10671ccd14e456d67b31ba02a1
Contents?: true
Size: 1.13 KB
Versions: 4
Compression:
Stored size: 1.13 KB
Contents
module Stickler::Repository # # A null repository. It is in most respecs like a Repository::Local that has # nothing in it. # # The response to +root_dir+ is set by default to be the class name, or # whatever is passed to the initializer. # class Null # the root directory of the repository, this is set in the constructor attr_reader :root_dir def initialize( root_dir = self.class.name ) @root_dir = root_dir end def empty_string( junk = "" ) "" end alias :uri :empty_string alias :gems_uri :empty_string def nilish( junk = nil, &block ) nil end alias :push :nilish alias :delete :nilish alias :yank :nilish alias :get :nilish alias :open :nilish alias :uri_for_gem :nilish alias :full_path_to_gem :nilish alias :full_path_to_specification :nilish def last_modified_time Time.now end def empty_array( junk = nil ) [] end alias :specs :empty_array alias :latest_specs :empty_array alias :search_for :empty_array def specs Array.new end def latest_specs Array.new end end end
Version data entries
4 entries across 4 versions & 1 rubygems