Guest User

Untitled

a guest
Apr 26th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. class Foo
  2. def initialize
  3. @bar = "baz"
  4. end
  5.  
  6. def render
  7. b = binding
  8. ERB.new("<%= @bar %>").result b
  9. end
  10. end
  11.  
  12. Foo.new.render => "baz"
Add Comment
Please, Sign In to add comment