Sha256: 8375edbbc33492547c65eab7e6d7528683f872a7b1ad3a5f9d457534586b3c55

Contents?: true

Size: 518 Bytes

Versions: 4

Compression:

Stored size: 518 Bytes

Contents

# Father of all the client side controllers of **Faalis**
class Faalis.BaseController
  # **scope_obj** is an **AngularJS** scope instance that child
  # class should provide using `super` syntax
  constructor: (scope_obj)->

    # Inject all the methods in current object prototype
    # to the scope except for those which starts with an
    # underscore.
    Object.keys(this.__proto__, (key) ->
      if (this[key] instanceof Function)
        unless key.startsWith('_')
          scope_obj[key] = this[key]
    )

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
faalis-1.0.0 app/assets/javascripts/faalis/dashboard/lib/controllers/base_controller.js.coffee
faalis-1.0.0.alpha4 app/assets/javascripts/faalis/dashboard/lib/controllers/base_controller.js.coffee
faalis-1.0.0.alpha3 app/assets/javascripts/faalis/dashboard/lib/controllers/base_controller.js.coffee
faalis-1.0.0.alpha2 app/assets/javascripts/faalis/dashboard/lib/controllers/base_controller.js.coffee