Skip to content

# type_expressions: true magic comment #43

Description

@maedi

Using LowLoad we have the ability to make LowType easier to enable for every class inside a file.

Proposal

A magic comment at the top of the Ruby file that enables LowType for that file:

# type_expressions: true

class MyClass
  include LowType # No longer needed with this magic comment!
end

Implementation

Currently an included hook triggers LowType on "class load". However this magic comment would be at the "file load" stage before any file is loaded into Ruby and before any code is actually evaluated. So this magic comment will need to trigger LowType at the "class load" phase somehow. It could add an include LowType line of code to every class... but this feels hacky, there must be a programatic way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions