Class: Respondable

Inherits:
Object
  • Object
show all
Defined in:
lib/respondable.rb

Constant Summary collapse

VERSION =
"0.0.1"

Instance Method Summary collapse

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

Returns:

  • (Boolean)


8
9
10
# File 'lib/respondable.rb', line 8

def _?(sym)
  @obj.respond_to?(sym)
end