Update Vendored Erubis to 2.6.6
This commit is contained in:
parent
c18c2f988d
commit
39c2138f88
300 changed files with 207 additions and 171 deletions
16
vendor/plugins/erubis/test/data/users-guide/example5.rb
vendored
Normal file
16
vendor/plugins/erubis/test/data/users-guide/example5.rb
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
require 'erubis'
|
||||
input = File.read('example5.eruby')
|
||||
eruby = Erubis::Eruby.new(input) # create Eruby object
|
||||
|
||||
## create context object
|
||||
## (key means var name, which may be string or symbol.)
|
||||
context = {
|
||||
:val => 'Erubis Example',
|
||||
'list' => ['aaa', 'bbb', 'ccc'],
|
||||
}
|
||||
## or
|
||||
# context = Erubis::Context.new()
|
||||
# context['val'] = 'Erubis Example'
|
||||
# context[:list] = ['aaa', 'bbb', 'ccc'],
|
||||
|
||||
puts eruby.evaluate(context) # get result
|
Loading…
Add table
Add a link
Reference in a new issue