Skip to content

Update multiple formatter interface #295

Description

@sferik

I left a comment on #158 but I thought I would open an issue proposing a new interface for specifying multiple formatters:

SimpleCov.formatters = [
  SimpleCov::Formatter::HTMLFormatter,
  SimpleCov::Formatter::CSVFormatter,
]

This is the current interface:

SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
  SimpleCov::Formatter::HTMLFormatter,
  SimpleCov::Formatter::CSVFormatter,
]

I think my proposal is better than the current interface because (conventionally) the [] method is used to fetch a value, not to set a value.

This proposal would not require breaking the current interface SimpleCov.formatter because the new method is named SimpleCov.formatters (with an “s”).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions