Skip to content

Support for modules included in a class #3

@paulcsmith

Description

@paulcsmith

Let's say I have a module that is included in a class:

module Paramable
  include Cannon::Auto

  abstract def parse
end

class JsonParams
  include Paramable
end

class FormEncodedParams
  include Paramable
end

And I make an instance var of the module type

class Action
  include Cannon::Auto

  @params : Paramable
end

The problem is that Paramable is a module so you can't define instance methods on it that Cannon expects.

Is there a way to do this? And if not, do you have an idea of where I could start? I'd love to try a PR

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