class Bindgen::Template::EvaluateOnce

Overview

Wraps a template that uses % more than once, so that the code, commonly a function call, is evaluated only once. The code is bound to a variable named bg_value, which the pattern then uses instead.

Defined in:

bindgen/template/evaluate_once.cr

Constant Summary

VARIABLE = "bg_value"

Name of the variable the code is bound to.

Constructors

Instance Method Summary

Instance methods inherited from class Bindgen::Template::Base

followed_by(other : Base) : Base followed_by, no_op? : Bool no_op?, template(code : String) : String template

Constructor Detail

def self.new(pattern : Basic, language : Language) #

[View source]

Instance Method Detail

def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


[View source]
def no_op? : Bool #
Description copied from class Bindgen::Template::Base

Is this a no-operation template?


[View source]
def template(code) : String #

[View source]