Sha256: 7057a342ddbb07610783f6b142c9bcf2cd922b91cb6a3e069ab15dcc7b8d5a50

Contents?: true

Size: 808 Bytes

Versions: 1

Compression:

Stored size: 808 Bytes

Contents

require 'action_view/base'
require 'action_view/template'

module ActionView 
#----------------

  class Base
  #---------
    
    cattr_accessor :pretty_json
    @@pretty_json = false
  
  end

end

module ActionView 
#----------------

  module Template::Handlers
  #------------------------
  
    class Notator
    #------------

      # default format used by Notator
      class_attribute :default_format
      self.default_format = Mime::JSON

      def call( template )
      #-------------------
      
        "json = ::Notator::JavascriptObjectNotation.new();" +
        "(" + template.source + ");" +
        "json.to_json;"
    
      end

    end

  end

end

ActionView::Template.
  register_template_handler :notator, 
                            ActionView::Template::Handlers::Notator.new

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
notator-1.0.0 lib/notator/template.rb