Class: DRb::DRbUnknown
- Inherits:
-
Object
- Object
- DRb::DRbUnknown
- Defined in:
- lib/drb/drb.rb
Instance Attribute Summary collapse
-
#buf ⇒ Object
readonly
Returns the value of attribute buf.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
- #_dump(lv) ⇒ Object
- #exception ⇒ Object
-
#initialize(err, buf) ⇒ DRbUnknown
constructor
A new instance of DRbUnknown.
- #reload ⇒ Object
Constructor Details
#initialize(err, buf) ⇒ DRbUnknown
Returns a new instance of DRbUnknown.
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/drb/drb.rb', line 35 def initialize(err, buf) case err.to_s when /uninitialized constant (\S+)/ @name = $1 when /undefined class\/module (\S+)/ @name = $1 else @name = nil end @buf = buf end |
Instance Attribute Details
#buf ⇒ Object (readonly)
Returns the value of attribute buf.
48 49 50 |
# File 'lib/drb/drb.rb', line 48 def buf @buf end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
47 48 49 |
# File 'lib/drb/drb.rb', line 47 def name @name end |
Class Method Details
._load(s) ⇒ Object
50 51 52 53 54 55 56 |
# File 'lib/drb/drb.rb', line 50 def self._load(s) begin Marshal::load(s) rescue NameError, ArgumentError DRbUnknown.new($!, s) end end |
Instance Method Details
#_dump(lv) ⇒ Object
58 59 60 |
# File 'lib/drb/drb.rb', line 58 def _dump(lv) @buf end |
#exception ⇒ Object
66 67 68 |
# File 'lib/drb/drb.rb', line 66 def exception DRbUnknownError.new(self) end |
#reload ⇒ Object
62 63 64 |
# File 'lib/drb/drb.rb', line 62 def reload self.class._load(@buf) end |