Class: RbRsync::Negator

Inherits:
Object
  • Object
show all
Defined in:
lib/rbrsync/negator.rb

Instance Method Summary collapse

Constructor Details

#initialize(rbsync) ⇒ Negator

Returns a new instance of Negator.



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/rbrsync/negator.rb', line 5

def initialize rbsync
  @rbsync = rbsync

  RbRsync.boolean_methods.each do |m|

    (class << self; self; end).class_eval <<-RUBY
      def #{m}
        @rbsync.#{m.gsub(/!$/, '')} = false
      end
    RUBY

  end
end