maxjacobson/film_snob

View on GitHub
lib/film_snob/oembed_provider.rb

Summary

Maintainability
A
2 hrs
Test Coverage

Class OembedProvider has 21 methods (exceeds 20 allowed). Consider refactoring.
Open

  class OembedProvider
    attr_reader :url, :options

    def initialize(url, options = {})
      @url = url
Severity: Minor
Found in lib/film_snob/oembed_provider.rb - About 2 hrs to fix

    Reverse the order of the operands "https" == uri.scheme.
    Open

            "https" == uri.scheme
    Severity: Minor
    Found in lib/film_snob/oembed_provider.rb by rubocop

    This cop checks for Yoda conditions, i.e. comparison operations where readability is reduced because the operands are not ordered the same way as they would be ordered in spoken English.

    Example: EnforcedStyle: allcomparisonoperators (default)

    # bad
    99 == foo
    "bar" != foo
    42 >= foo
    10 < bar
    
    # good
    foo == 99
    foo == "bar"
    foo <= 42
    bar > 10

    Example: EnforcedStyle: equalityoperatorsonly

    # bad
    99 == foo
    "bar" != foo
    
    # good
    99 >= foo
    3 < a && a < 5

    There are no issues that match your filters.

    Category
    Status