-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Something like this:
record Article, title : String, content : String
class ArticleRenderer < Crinder::Base(Article)
field title : String, value: ->{ upcase_title? ? title.upcase : title }
field content : String
option upcase_title? : Bool = false
end
article = Article.new(title: "Render Options", content: "This is a new feature.")
ArticleRenderer.render(article, upcase_title?: true) # => "{\"title\":\"RENDER OPTIONS\",\"content\":\"This is a new feature.\"}"
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request