Module: TddiumReporting::RespondToChain
- Defined in:
- lib/tddium_reporting/respond_to_chain.rb
Instance Method Summary collapse
Instance Method Details
#respond_to_chain?(subject, *chain) ⇒ Boolean
5 6 7 8 9 10 11 |
# File 'lib/tddium_reporting/respond_to_chain.rb', line 5 def respond_to_chain?(subject, *chain) chain.each do |k| return false unless subject.respond_to?(k) subject = subject.send(k) end true end |