Class: Roby::Distributed::DRobyConstant
- Defined in:
- lib/roby/distributed/protocol.rb
Overview
Dumps a constant by using its name. On reload, #proxy searches for a constant with the same name, and raises ArgumentError if none exists.
Defined Under Namespace
Modules: Dump
Constant Summary collapse
- @@valid_constants =
Hash.new
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
The constant name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name) ⇒ DRobyConstant
constructor
A new instance of DRobyConstant.
-
#proxy(peer) ⇒ Object
Returns the local object which can be referenced by this name, or raises ArgumentError.
- #to_s ⇒ Object
Constructor Details
#initialize(name) ⇒ DRobyConstant
Returns a new instance of DRobyConstant.
320 |
# File 'lib/roby/distributed/protocol.rb', line 320 def initialize(name); @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
The constant name
319 320 321 |
# File 'lib/roby/distributed/protocol.rb', line 319 def name @name end |
Class Method Details
.valid_constants ⇒ Object
295 |
# File 'lib/roby/distributed/protocol.rb', line 295 def self.valid_constants; @@valid_constants end |
Instance Method Details
#proxy(peer) ⇒ Object
Returns the local object which can be referenced by this name, or raises ArgumentError.
323 |
# File 'lib/roby/distributed/protocol.rb', line 323 def proxy(peer); constant(name) end |
#to_s ⇒ Object
296 |
# File 'lib/roby/distributed/protocol.rb', line 296 def to_s; "#<dRoby:Constant #{name}>" end |