| 1 | require 'mustache' |
| 2 | |
| 3 | class DotNotation < Mustache |
| 4 | self.path = File.dirname(__FILE__) |
| 5 | |
| 6 | def person |
| 7 | return { |
| 8 | :name => OpenStruct.new(:first => 'Chris', :last => 'Firescythe'), |
| 9 | :age => 24, |
| 10 | :hometown => { |
| 11 | :city => "Cincinnati", |
| 12 | :state => "OH" |
| 13 | } |
| 14 | } |
| 15 | end |
| 16 | |
| 17 | def normal |
| 18 | "Normal" |
| 19 | end |
| 20 | end |
| 21 | |
| 22 | if $0 == __FILE__ |
| 23 | puts DotNotation.to_html |
| 24 | end |