Sha256: 427f67723cbcbcb70c1bdd90bfd71c6116d2a7a947afd6e49919d55dfb686317

Contents?: true

Size: 395 Bytes

Versions: 18

Compression:

Stored size: 395 Bytes

Contents

module Mercurial
  
  class Hook
    
    attr_reader :repository, :name, :value
    
    def initialize(repository, name, value)
      @repository = repository
      @name = name
      @value = value
    end
    
    def save
      repository.config.add_setting('hooks', name, value)
    end
    
    def destroy!
      repository.config.delete_setting!('hooks', name)
    end
    
  end
  
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
mercurial-ruby-0.7.12 lib/mercurial-ruby/hook.rb
mercurial-ruby-0.7.11 lib/mercurial-ruby/hook.rb
mercurial-ruby-0.7.10 lib/mercurial-ruby/hook.rb
mercurial-ruby-0.7.9 lib/mercurial-ruby/hook.rb
mercurial-ruby-0.7.8 lib/mercurial-ruby/hook.rb
mercurial-ruby-0.7.7 lib/mercurial-ruby/hook.rb
mercurial-ruby-0.7.6 lib/mercurial-ruby/hook.rb
mercurial-ruby-0.7.5 lib/mercurial-ruby/hook.rb
mercurial-ruby-0.7.4 lib/mercurial-ruby/hook.rb
mercurial-ruby-0.7.3 lib/mercurial-ruby/hook.rb
mercurial-ruby-0.7.2 lib/mercurial-ruby/hook.rb
mercurial-ruby-0.7.1 lib/mercurial-ruby/hook.rb
mercurial-ruby-0.7.0 lib/mercurial-ruby/hook.rb
mercurial-ruby-0.6.1 lib/mercurial-ruby/hook.rb
mercurial-ruby-0.6.0 lib/mercurial-ruby/hook.rb
mercurial-ruby-0.5.0 lib/mercurial-ruby/hook.rb
mercurial-ruby-0.4.0 lib/mercurial-ruby/hook.rb
mercurial-ruby-0.3.0 lib/mercurial-ruby/hook.rb