Class: Amrita2::Filters::Repeat
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(cnt) ⇒ Repeat
constructor
A new instance of Repeat.
- #value_filter_code(de, cg, value) ⇒ Object
Methods inherited from Base
filter_method, inherited, #parse_filter_a, #|
Constructor Details
#initialize(cnt) ⇒ Repeat
Returns a new instance of Repeat.
2136 2137 2138 |
# File 'lib/amrita2/template.rb', line 2136 def initialize(cnt) @cnt = cnt.to_i end |
Instance Method Details
#value_filter_code(de, cg, value) ⇒ Object
2140 2141 2142 2143 |
# File 'lib/amrita2/template.rb', line 2140 def value_filter_code(de, cg, value) cg.code("$_ = $_ * #@cnt ") super end |