Class: Respondable
- Inherits:
-
Object
- Object
- Respondable
- Defined in:
- lib/respondable.rb
Constant Summary collapse
- VERSION =
"0.0.1"
Instance Method Summary collapse
- #_?(sym) ⇒ Boolean
-
#initialize(obj) ⇒ Respondable
constructor
A new instance of Respondable.
Constructor Details
#initialize(obj) ⇒ Respondable
Returns a new instance of Respondable.
4 5 6 |
# File 'lib/respondable.rb', line 4 def initialize(obj) @obj = obj end |
Instance Method Details
#_?(sym) ⇒ Boolean
8 9 10 |
# File 'lib/respondable.rb', line 8 def _?(sym) @obj.respond_to?(sym) end |