Skip to content

Support erb partial paramater comments #451

Description

@rachelgraves

Is your feature request related to a problem? Please describe.

When using a partial that includes paramaters in a comment, the initialize method is not generated with those paramaters.

i.e.

<%# locals: (question:, answer: nil, open: false) %>

Describe the solution you'd like

Produce an initializer, and include any defaults.

attr_reader :question, :answer, :open

def initialize(question:, answer: nil, open: false)
  @question = question
  @answer = answer
  @open = open
end

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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