Is there a good way to chain methods conditionally in Ruby?
What I want to do functionally is
if a && b && c my_object.some_method_b
I use this pattern:
class A def some_method_because_of_a ... return self end def some_method_because_of_b ... return self end end a = A.new a.some_method_because_of_a().some_method_because_of_b()