Skip to content

best practice for long method signatures with many defaults #289

@askreet

Description

@askreet

I didn't see this defined in the guide, sorry if I'm just not seeing it.

The guide should define a best practice for long method signatures, like:

def do_something(os = 'precise', os_bits = 64, instance_type = 'instance-store', min_priority = 7)
...
end

For example, here are some options:

def do_something(os = 'precise', os_bits = 64,
                 instance_type = 'instance-store', min_priority = 7)
def do_something(os = 'precise',
                 os_bits = 64,
                 instance_type = 'instance-store',
                 min_priority = 7)
def do_something(
  os = 'precise',
  os_bits = 64,
  instance_type = 'instance-store',
  min_priority = 7)

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