Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

simple.rb 323B

16 lat temu
1234567891011121314151617181920212223242526
  1. $LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
  2. require 'mustache'
  3. class Simple < Mustache
  4. self.path = File.dirname(__FILE__)
  5. def name
  6. "Chris"
  7. end
  8. def value
  9. 10_000
  10. end
  11. def taxed_value
  12. value - (value * 0.4)
  13. end
  14. def in_ca
  15. true
  16. end
  17. end
  18. if $0 == __FILE__
  19. puts Simple.to_html
  20. end