Class: Nitpick::Warnings::IdenticalBranch

Class | Nitpick::Warnings::IdenticalBranch
In: | lib/nitpick/warnings/identical_branch.rb
Parent: | SimpleWarning

### Methods

matches? message new

### Attributes

no_branch | [R] |
yes_branch | [R] |

### Public Class methods

new(*args)

[Source]

    # File lib/nitpick/warnings/identical_branch.rb, line 5
          def initialize(*args)
            @cond, @yes_branch, @no_branch = args
          end

### Public Instance methods

matches?()

[Source]

    # File lib/nitpick/warnings/identical_branch.rb, line 9
          def matches?
            yes_branch == no_branch
          end

message()

[Source]

    # File lib/nitpick/warnings/identical_branch.rb, line 13
          def message
            "The branches of 'if (#{sexp_to_ruby(@cond)})' are identical."
          end

[Validate]