myfreecomm/billimatic-client-ruby

View on GitHub
lib/billimatic/configuration.rb

Summary

Maintainability
A
0 mins
Test Coverage

Billimatic::Configuration has no descriptive comment
Open

  class Configuration
Severity: Minor
Found in lib/billimatic/configuration.rb by reek

Classes and modules are the units of reuse and release. It is therefore considered good practice to annotate every class and module with a brief comment outlining its responsibilities.

Example

Given

class Dummy
  # Do things...
end

Reek would emit the following warning:

test.rb -- 1 warning:
  [1]:Dummy has no descriptive comment (IrresponsibleModule)

Fixing this is simple - just an explaining comment:

# The Dummy class is responsible for ...
class Dummy
  # Do things...
end

Billimatic::Configuration#host is a writable attribute
Open

    attr_accessor :host, :user_agent
Severity: Minor
Found in lib/billimatic/configuration.rb by reek

A class that publishes a setter for an instance variable invites client classes to become too intimate with its inner workings, and in particular with its representation of state.

The same holds to a lesser extent for getters, but Reek doesn't flag those.

Example

Given:

class Klass
  attr_accessor :dummy
end

Reek would emit the following warning:

reek test.rb

test.rb -- 1 warning:
  [2]:Klass declares the writable attribute dummy (Attribute)

Billimatic::Configuration#user_agent is a writable attribute
Open

    attr_accessor :host, :user_agent
Severity: Minor
Found in lib/billimatic/configuration.rb by reek

A class that publishes a setter for an instance variable invites client classes to become too intimate with its inner workings, and in particular with its representation of state.

The same holds to a lesser extent for getters, but Reek doesn't flag those.

Example

Given:

class Klass
  attr_accessor :dummy
end

Reek would emit the following warning:

reek test.rb

test.rb -- 1 warning:
  [2]:Klass declares the writable attribute dummy (Attribute)

There are no issues that match your filters.

Category
Status