File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -782,12 +782,30 @@ def run(b=new_toplevel)
782782 print self . result ( b )
783783 end
784784
785+ # :markup: markdown
786+ #
787+ # :call-seq:
788+ # result(binding = top_level) -> string
789+ #
790+ # Formats the string stored in template `self`;
791+ # returns the string result:
792+ #
793+ # - Each [expression tag][expression tags] is replaced by the value of the embedded expression.
794+ # - Each [execution tag][execution tags] is removed, and its embedded code is executed.
795+ # - Each [comment tag][comment tags] is removed.
796+ #
797+ # See examples at the links.
785798 #
786- # Executes the generated ERB code to produce a completed template, returning
787- # the results of that code.
799+ # Argument `binding` is a [binding object],
800+ # which should contain the bindings needed for all expression tags;
801+ # the default is #top_level.
802+ # See [Bindings][bindings].
788803 #
789- # _b_ accepts a Binding object which is used to set the context of
790- # code evaluation.
804+ # [binding object]: https://docs.ruby-lang.org/en/master/Binding.html
805+ # [bindings]: rdoc-ref:ERB@Bindings
806+ # [comment tags]: rdoc-ref:ERB@Comment+Tags
807+ # [execution tags]: rdoc-ref:ERB@Execution+Tags
808+ # [expression tags]: rdoc-ref:ERB@Expression+Tags
791809 #
792810 def result ( b = new_toplevel )
793811 unless @_init . equal? ( self . class . singleton_class )
You can’t perform that action at this time.
0 commit comments