Skip to content

Unclear on benefits of code pattern used in toplevel Dirigible module. #21

@z5h

Description

@z5h

In the Dirigible module we see this code:

def self.api(options = {})
  Dirigible::API.new(options)
end

Every time api is referenced, as it is for all Dirigible calls via method_missing, a new API will be instantiated.

Why is this done? Why is there an options hash that (seemingly) can't be modified during these calls?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions