class Roby::DRoby::V5::DRobyConstant
Dumps a constant by using its name. On reload, proxy
searches for a constant with the same name, and raises ArgumentError if none exists.
@example dump instances of a class that are registered as constants
class Klass include DRobyConstant::Dump end # Obj can pass through droby Obj = Klass.new
@example dump classes. You usually would prefer using {DRobyModel}
# Klass can pass through droby class Klass extend DRobyConstant::Dump end
Attributes
name[R]
The constant name
remote_siblings[R]
Public Class Methods
clear_cache()
click to toggle source
# File lib/roby/droby/v5/droby_constant.rb, line 20 def self.clear_cache @@valid_constants.clear end
new(name, remote_siblings = Hash.new)
click to toggle source
# File lib/roby/droby/v5/droby_constant.rb, line 69 def initialize(name, remote_siblings = Hash.new) @name = name @remote_siblings = remote_siblings end
valid_constants()
click to toggle source
# File lib/roby/droby/v5/droby_constant.rb, line 25 def self.valid_constants; @@valid_constants end
Public Instance Methods
proxy(peer)
click to toggle source
Returns the local object which can be referenced by this name, or raises ArgumentError.
# File lib/roby/droby/v5/droby_constant.rb, line 75 def proxy(peer); constant(name) end
to_s()
click to toggle source
# File lib/roby/droby/v5/droby_constant.rb, line 26 def to_s; "#<dRoby:Constant #{name}>" end