Class: Pseudoo::BasicObject
- Inherits:
- BasicObject
- Defined in:
- lib/pseudoo/model/basic_object.rb
Direct Known Subclasses
Constant Summary collapse
- TypeError =
-
-
-
error
::Class.new(::TypeError) { def initialize(object) = '%s is not a kind of %s class' % [ object.class, @@pseudo_model.name] super() end }
- @@pseudo_substance =
self
- @@pseudo_model =
::BasicObject
Instance Attribute Summary collapse
-
#pseudo_object ⇒ Object
Returns the value of attribute pseudo_object.
Class Method Summary collapse
Instance Method Summary collapse
-
#! ⇒ Object
-
override - convert.
-
- #!=(other) ⇒ Object
-
#==(other) ⇒ Object
-
override - compare.
-
-
#initialize(**options) ⇒ BasicObject
constructor
-
override - initialize.
-
-
#pseudo? ⇒ Boolean
-
pseudo original - get - bool.
-
-
#pseudo_infection=(bool) ⇒ Object
-
pseudo original - set.
-
- #pseudo_infection? ⇒ Boolean
Constructor Details
#initialize(**options) ⇒ BasicObject
-
-
-
override - initialize
43 44 45 46 |
# File 'lib/pseudoo/model/basic_object.rb', line 43 def initialize(**) self.pseudo_object = @@pseudo_model.new (**) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object (private)
-
-
-
override - private - other
110 111 112 |
# File 'lib/pseudoo/model/basic_object.rb', line 110 def method_missing(method_name, *args, &block) @pseudo_object.__send__(method_name, *args, &block) end |
Instance Attribute Details
#pseudo_object ⇒ Object
Returns the value of attribute pseudo_object.
5 6 7 |
# File 'lib/pseudoo/model/basic_object.rb', line 5 def pseudo_object @pseudo_object end |
Class Method Details
.pseudo_superclass ⇒ Object
23 24 25 |
# File 'lib/pseudoo/model/basic_object.rb', line 23 def pseudo_superclass nil end |
Instance Method Details
#! ⇒ Object
-
-
-
override - convert
103 104 105 |
# File 'lib/pseudoo/model/basic_object.rb', line 103 def ! !@pseudo_object end |
#!=(other) ⇒ Object
96 97 98 |
# File 'lib/pseudoo/model/basic_object.rb', line 96 def !=(other) !(self == other) end |
#==(other) ⇒ Object
-
-
-
override - compare
91 92 93 94 |
# File 'lib/pseudoo/model/basic_object.rb', line 91 def ==(other) __id__ == other.__id__ \ || @pseudo_object.__id__ == other.__id__ end |
#pseudo? ⇒ Boolean
-
-
-
pseudo original - get - bool
70 71 72 |
# File 'lib/pseudoo/model/basic_object.rb', line 70 def pseudo? true end |
#pseudo_infection=(bool) ⇒ Object
-
-
-
pseudo original - set
58 59 60 |
# File 'lib/pseudoo/model/basic_object.rb', line 58 def pseudo_infection=(bool) @pseudo_infection = !!bool end |
#pseudo_infection? ⇒ Boolean
74 75 76 |
# File 'lib/pseudoo/model/basic_object.rb', line 74 def pseudo_infection? @pseudo_infection end |