Class: DRb::DRbUnknown
- Inherits:
-
Object
- Object
- DRb::DRbUnknown
- Defined in:
- lib/opal/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.
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/opal/drb/drb.rb', line 38 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.
51 52 53 |
# File 'lib/opal/drb/drb.rb', line 51 def buf @buf end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
50 51 52 |
# File 'lib/opal/drb/drb.rb', line 50 def name @name end |
Class Method Details
._load(s) ⇒ Object
53 54 55 56 57 58 59 |
# File 'lib/opal/drb/drb.rb', line 53 def self._load(s) begin Marshal::load(s) rescue NameError, ArgumentError DRbUnknown.new($!, s) end end |
Instance Method Details
#_dump(lv) ⇒ Object
61 62 63 |
# File 'lib/opal/drb/drb.rb', line 61 def _dump(lv) @buf end |
#exception ⇒ Object
69 70 71 |
# File 'lib/opal/drb/drb.rb', line 69 def exception DRbUnknownError.new(self) end |
#reload ⇒ Object
65 66 67 |
# File 'lib/opal/drb/drb.rb', line 65 def reload self.class._load(@buf) end |