Class: Surrogate::ApiComparer::ActualMethods
- Inherits:
-
Struct
- Object
- Struct
- Surrogate::ApiComparer::ActualMethods
- Defined in:
- lib/surrogate/api_comparer.rb
Overview
methods from the actual class (as opposed to “these are actually methods”
Instance Attribute Summary collapse
-
#actual ⇒ Object
Returns the value of attribute actual.
Instance Method Summary collapse
- #class_inherited_methods ⇒ Object
- #class_other_methods ⇒ Object
- #instance_inherited_methods ⇒ Object
- #instance_other_methods ⇒ Object
- #methods ⇒ Object
Instance Attribute Details
#actual ⇒ Object
Returns the value of attribute actual
53 54 55 |
# File 'lib/surrogate/api_comparer.rb', line 53 def actual @actual end |
Instance Method Details
#class_inherited_methods ⇒ Object
74 75 76 |
# File 'lib/surrogate/api_comparer.rb', line 74 def class_inherited_methods Set.new actual.singleton_class.instance_methods - actual.singleton_class.instance_methods(false) end |
#class_other_methods ⇒ Object
78 79 80 |
# File 'lib/surrogate/api_comparer.rb', line 78 def class_other_methods Set.new(actual.singleton_class.instance_methods) - class_inherited_methods end |
#instance_inherited_methods ⇒ Object
66 67 68 |
# File 'lib/surrogate/api_comparer.rb', line 66 def instance_inherited_methods Set.new actual.instance_methods - actual.instance_methods(false) end |
#instance_other_methods ⇒ Object
70 71 72 |
# File 'lib/surrogate/api_comparer.rb', line 70 def instance_other_methods Set.new(actual.instance_methods) - instance_inherited_methods end |
#methods ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/surrogate/api_comparer.rb', line 54 def methods { instance: { inherited: instance_inherited_methods, other: instance_other_methods, }, class: { inherited: class_inherited_methods, other: class_other_methods, }, } end |