IotaSpencer/cloud_party

View on GitHub
lib/cloud_party/responses/ips.rb

Summary

Maintainability
A
0 mins
Test Coverage

Extra blank line detected.
Open


      def inspect
Severity: Minor
Found in lib/cloud_party/responses/ips.rb by rubocop

This cops checks for two or more consecutive blank lines.

Example:

# bad - It has two empty lines.
some_method
# one empty line
# two empty lines
some_method

# good
some_method
# one empty line
some_method

Use attr_reader to define trivial reader methods.
Open

      def code
Severity: Minor
Found in lib/cloud_party/responses/ips.rb by rubocop

This cop looks for trivial reader/writer methods, that could have been created with the attr_* family of functions automatically.

Example:

# bad
def foo
  @foo
end

def bar=(val)
  @bar = val
end

def self.baz
  @baz
end

# good
attr_reader :foo
attr_writer :bar

class << self
  attr_reader :baz
end

Use empty lines between method definitions.
Open

      def inspect
Severity: Minor
Found in lib/cloud_party/responses/ips.rb by rubocop

This cop checks whether method definitions are separated by one empty line.

NumberOfEmptyLines can be and integer (e.g. 1 by default) or an array (e.g. [1, 2]) to specificy a minimum and a maximum of empty lines.

AllowAdjacentOneLineDefs can be used to configure is adjacent one line methods definitions are an offense

Example:

# bad
def a
end
def b
end

Example:

# good
def a
end

def b
end

Redundant use of Object#to_s in interpolation.
Open

          outputs << "#{m.to_s}=#{send(m)}"
Severity: Minor
Found in lib/cloud_party/responses/ips.rb by rubocop

This cop checks for string conversion in string interpolation, which is redundant.

Example:

# bad

"result is #{something.to_s}"

Example:

# good

"result is #{something}"

Use empty lines between method definitions.
Open

      def successful?
Severity: Minor
Found in lib/cloud_party/responses/ips.rb by rubocop

This cop checks whether method definitions are separated by one empty line.

NumberOfEmptyLines can be and integer (e.g. 1 by default) or an array (e.g. [1, 2]) to specificy a minimum and a maximum of empty lines.

AllowAdjacentOneLineDefs can be used to configure is adjacent one line methods definitions are an offense

Example:

# bad
def a
end
def b
end

Example:

# good
def a
end

def b
end

Extra blank line detected.
Open



Severity: Minor
Found in lib/cloud_party/responses/ips.rb by rubocop

This cops checks for two or more consecutive blank lines.

Example:

# bad - It has two empty lines.
some_method
# one empty line
# two empty lines
some_method

# good
some_method
# one empty line
some_method

Unused method argument - options. If it's necessary, use _ or _options as an argument name to indicate that it won't be used.
Open

      def initialize(method_name, endpoint, response, options)
Severity: Minor
Found in lib/cloud_party/responses/ips.rb by rubocop

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

There are no issues that match your filters.

Category
Status