lib/domesticate_monkeys/constants/track.rb
def add_source(method_name, source)
      
      $DOMESTICATE_MONKEYS_COUNT += 1
      
      if $BOOTING_MAIN_APP && !$SKIP_COUNT_PRINTING
        printf("\r   Methods defined: #{$DOMESTICATE_MONKEYS_COUNT}\r")
      end

      @method ||= method_name
      
      # Duplicate the retrieved self.sources, in order to avoid the instance variable
      # from hanging and being stacked with every new source – shared between multiple
      # instances.
      dupped_sources = @sources.dup

      # Only add a source to the sources variable if the method is being redefined, i.e.
      # being defined by source code that differs from the previously held definition.
      # If a file is being read for a second time, the method is technically defined again
      # but not redefined, since all behaviour is still the same. Therefore we should not
      # track such cases.
      dupped_sources << source unless dupped_sources.last == source

      # Update the tracker's state, and add it to our global $DOMESTICATE_MONKEYS_TRACKS dictionary afterwards. 
      @sources = dupped_sources
      @count   = dupped_sources.size

      $DOMESTICATE_MONKEYS_TRACKS[self.method] = self
    end
# The Track instance keeps track of the amount of definitions, the chronological
# sequence of the source of the definitions, and potentially other information
# which we will deem valuable in the future.
The Track instance keeps track of the amount of definitions, the chronological
sequence of the source of the definitions, and potentially other information
which we will deem valuable in the future.
The Track instance keeps track of the amount of definitions the chronological sequence of the source of the definitions and potentially other information which we will deem valuable in the future .
def add_source(method_name, source)
      $DOMESTICATE_MONKEYS_COUNT += 1
      if $BOOTING_MAIN_APP && !$SKIP_COUNT_PRINTING
        printf("\r   Methods defined: #{$DOMESTICATE_MONKEYS_COUNT}\r")
      end
      @method ||= method_name
      dupped_sources = @sources.dup
      dupped_sources << source unless dupped_sources.last == source
      @sources = dupped_sources
      @count   = dupped_sources.size
      $DOMESTICATE_MONKEYS_TRACKS[self.method] = self
    end
def add_source ( method_name , source ) $DOMESTICATE_MONKEYS_COUNT += 1 if $BOOTING_MAIN_APP && ! $SKIP_COUNT_PRINTING printf ( "\r   Methods defined: #{$DOMESTICATE_MONKEYS_COUNT}\r" ) end @method ||= method_name dupped_sources = @sources . dup dupped_sources << source unless dupped_sources . last == source @sources = dupped_sources @count = dupped_sources . size $DOMESTICATE_MONKEYS_TRACKS [ self . method ] = self end
The Track instance keeps track of the amount of definitions, the chronological
sequence of the source of the definitions, and potentially other information
which we will deem valuable in the future.
The Track instance keeps track of the amount of definitions the chronological sequence of the source of the definitions and potentially other information which we will deem valuable in the future .
# Duplicate the retrieved self.sources, in order to avoid the instance variable # from hanging and being stacked with every new source – shared between multiple # instances. # Only add a source to the sources variable if the method is being redefined, i.e. # being defined by source code that differs from the previously held definition. # If a file is being read for a second time, the method is technically defined again # but not redefined, since all behaviour is still the same. Therefore we should not # track such cases. # Update the tracker's state, and add it to our global $DOMESTICATE_MONKEYS_TRACKS dictionary afterwards. 
method_name
source