module InternalRubymentModule

# begin_documentation

CLOSED for extensions: The module InternalRubymentModule should have been called RubymentInternalModule instead, to preserve the naming standards. RubymentInternalModule will receive the new functions, and InternalRubymentModule must be closed for extensions.

This module offers function to interface with certain internal structures. Ie, these functions are supposed to be useless unless running Rubyment.

# end_documentation

Public Instance Methods

autoreload(wtime=1) click to toggle source

load __FILE__ – so a threaded invocation, like the functions running a tcp server, can call this function and reload without having to restart the process.

# File lib/rubyment.rb, line 725
def autoreload wtime=1
  (
    sleep wtime
  ) while rubyment_memory__get_key :file_reloading
  rubyment_memory__set_key :file_reloading, true
  load rubyment_memory__get_key :filepath
  rubyment_memory__set_key :file_reloading, false
end
rubyment_memory__() click to toggle source

gets the current @memory

# File lib/rubyment.rb, line 681
def rubyment_memory__
  @memory
end
rubyment_memory__get_key(k) click to toggle source

get the current @memory

# File lib/rubyment.rb, line 713
def rubyment_memory__get_key k
  @memory[k]
end
rubyment_memory__set(m) click to toggle source

sets the current @memory with a new hash m

# File lib/rubyment.rb, line 697
def rubyment_memory__set m
  @memory =  m
end
rubyment_memory__set_key(k, v) click to toggle source

set the current @memory with v

# File lib/rubyment.rb, line 705
def rubyment_memory__set_key k, v
  @memory[k] = v
end
rubyment_memory__shallow_update(m) click to toggle source

updates the current @memory with a new hash m

# File lib/rubyment.rb, line 689
def rubyment_memory__shallow_update m
  @memory.update m
end