Sha256: 885e9df7301f140922354aca4c90a42797c8cf04254ae1032137a1f7bc065971

Contents?: true

Size: 292 Bytes

Versions: 23

Compression:

Stored size: 292 Bytes

Contents

require 'ramaze'
require 'fjson'

class User
  def to_yaml
    "Look, I'm YAML!".to_yaml
  end

  def to_json
    "Look, I'm YSON!".to_json
  end
end

class MainController < Ramaze::Controller
  helper :provide
  provides :yaml, :json

  def user
    display User.new
  end
end

Ramaze.start

Version data entries

23 entries across 23 versions & 5 rubygems

Version Path
Pistos-ramaze-2008.09 examples/helpers/provide.rb
Pistos-ramaze-2008.12 examples/helpers/provide.rb
Pistos-ramaze-2009.01 examples/helpers/provide.rb
Pistos-ramaze-2009.02 examples/helpers/provide.rb
Pistos-ramaze-2009.04.08 examples/helpers/provide.rb
clivecrous-ramaze-0.3.9.5 examples/provide.rb
manveru-ramaze-2008.07 examples/helpers/provide.rb
manveru-ramaze-2008.08 examples/helpers/provide.rb
manveru-ramaze-2008.09 examples/helpers/provide.rb
manveru-ramaze-2008.10 examples/helpers/provide.rb
manveru-ramaze-2008.12 examples/helpers/provide.rb
manveru-ramaze-2009.01 examples/helpers/provide.rb
manveru-ramaze-2009.04.01 examples/helpers/provide.rb
manveru-ramaze-2009.04.08 examples/helpers/provide.rb
manveru-ramaze-2009.04.18 examples/helpers/provide.rb
manveru-ramaze-2009.04.22 examples/helpers/provide.rb
ptomato-ramaze-2009.02.1 examples/helpers/provide.rb
ptomato-ramaze-2009.02 examples/helpers/provide.rb
ramaze-2009.01 examples/helpers/provide.rb
ramaze-2008.06 examples/helpers/provide.rb