class Blog include Waves::Resource::Server resource :list, :expires => 3.days, [ ‘blogs’ ] do get { model.find_all } end resource :element, :expires => 3.days, [ ‘blog’, :name ] do get { model.find_by_name( captured.name ) } end schema :element, [ 'schema', 'blog', '2009-03' ] do attributes :title => String, :description => String link :entries, :list => Story end representations :list do as :html, :lang => :en do | blogs | view( :blog ).list( blogs ) end end representations :element do as :html, :lang => :en do | blog | view( :blog ).show( blog ) end end end