Sha256: bc2781778ed57676920654109e193363779369b5a5b01749f2fc0ae45cd7132c

Contents?: true

Size: 595 Bytes

Versions: 4

Compression:

Stored size: 595 Bytes

Contents

module "AS", ->
  class @Application
    AS.Event.extends(this)

    constructor: (args) ->
      @template_source = @template_source()
      for name, template of @template_source
        @template_source[name] = CoffeeKup.compile(template, locals:yes, hardcode:AS.TemplateHelpers)
      
      $ => @initialize?()

    template_source: -> @Templates

    view: (constructor, options={}) ->
      options.application = this
      new constructor options

    render: (template_name, locals={}) ->
      data = {context: this, locals:locals}
      @template_source[template_name](data)
    
    

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alpha-simprini-engine-0.0.4 app/assets/javascripts/alpha_simprini/application.coffee
alpha-simprini-engine-0.0.3 app/assets/javascripts/alpha_simprini/application.coffee
alpha-simprini-engine-0.0.2 app/assets/javascripts/alpha_simprini/application.coffee
alpha-simprini-engine-0.0.1 app/assets/javascripts/alpha_simprini/application.coffee