Class: Hashira::Smells::Branches
- Inherits:
-
Object
- Object
- Hashira::Smells::Branches
- Defined in:
- lib/hashira/smells/branches.rb
Instance Method Summary collapse
-
#initialize(root) ⇒ Branches
constructor
A new instance of Branches.
- #together?(nodes) ⇒ Boolean
Constructor Details
Instance Method Details
#together?(nodes) ⇒ Boolean
10 |
# File 'lib/hashira/smells/branches.rb', line 10 def together?(nodes) = nodes.combination(2).any? { |left, right| meet?(trail(left), trail(right)) } |