lib/film_snob/oembed_provider.rb
Class OembedProvider
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class OembedProvider
attr_reader :url, :options
def initialize(url, options = {})
@url = url
Reverse the order of the operands "https" == uri.scheme
. Open
Open
"https" == uri.scheme
- Read upRead up
- Exclude checks
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