Skip to content

Should use a less common variable in templater #16

Description

@thinkerbot

Like attrs or similar... otherwise attrs cannot be used as a variable.

# Build the template, setting the attributes and filename if specified.
# All methods of self will be accessible in the template.
def build(attrs=nil, filename=nil)
  attrs.each_pair do |key, value|
    send("#{key}=", value)
  end if attrs

  @template.filename = filename
  @template.result(binding)
  @_erbout
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