Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api rename change: Template -> Render #4

Merged
merged 1 commit into from
Apr 21, 2014
Merged

api rename change: Template -> Render #4

merged 1 commit into from
Apr 21, 2014

Conversation

kellyredding
Copy link
Member

When trying to name the objects in play with this lib, I was running
into mental roadblocks with the current setup. You need two objects
in play here: one to store the configuration from the user and another
to be the scope that the template source is evaluated against.

I had originally thought I would use Template for the config and
something else for the scope. But as I tried to name the something
I realized the naming was off. I think Template should be the
scope your source file evals against. It's called a "template file"
after all.

So here I'm thinking the config object should be called a Render.
A render builds and renders a template in the correct format. The
naming seems to flow better with the action and other names involved.

This does the trivial rename of Template to Render.

@jcredding ready for review.

When trying to name the objects in play with this lib, I was running
into mental roadblocks with the current setup.  You need two objects
in play here: one to store the configuration from the user and another
to be the scope that the template source is evaluated against.

I had originally thought I would use `Template` for the config and
_something_ else for the scope.  But as I tried to name the something
I realized the naming was off.  I think `Template` should be the
scope your source file evals against.  It's called a "template file"
after all.

So here I'm thinking the config object should be called a `Render`.
A render builds and renders a template in the correct format.  The
naming seems to flow better with the action and other names involved.

This does the trivial rename of `Template` to `Render`.
@kellyredding
Copy link
Member Author

@jcredding since we briefly discussed this yesterday, going to go ahead and merge.

kellyredding added a commit that referenced this pull request Apr 21, 2014
api rename change: Template -> Render
@kellyredding kellyredding merged commit 1356399 into master Apr 21, 2014
@kellyredding kellyredding deleted the kr-rename branch April 21, 2014 13:50
kellyredding added a commit that referenced this pull request Jun 4, 2014
first alpha release:

* setup benchmarking against RABL #1
* Readme with usage/notes details on template rendering #2
* basic template class with source file and locals #3
* api rename change: Template -> Render #4
* first pass at Template class with `node` and `map` implemmentations #5
* have templates evaluate given source files #6
* apply locals to template scope as reader methods #7
* Source object for rendering templates #8
* updated bench scripts to bench against Nm #9
* `render` and `partial` template and source methods #10

/cc @jcredding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant