Sha256: b24b340ad70ade43d4d59e68904463abe7a986ddfb609afa0062daab504b46dc

Contents?: true

Size: 378 Bytes

Versions: 9

Compression:

Stored size: 378 Bytes

Contents

moduleKeywords = ['extended', 'included']

class @Gmaps.Base

  @extend: (obj) ->
    for key, value of obj when key not in moduleKeywords
      @[key] = value

    obj.extended?.apply(@)
    this

  @include: (obj) ->
    for key, value of obj when key not in moduleKeywords
      # Assign properties to the prototype
      @::[key] = value
    obj.included?.apply(@)
    this

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gmaps4rails-2.1.2 vendor/assets/javascripts/gmaps/base/base.coffee
gmaps4rails-2.1.1 vendor/assets/javascripts/gmaps/base/base.coffee
gmaps4rails-2.1.0 vendor/assets/javascripts/gmaps/base/base.coffee
gmaps4rails-2.0.5 vendor/assets/javascripts/gmaps/base/base.coffee
gmaps4rails-2.0.4 vendor/assets/javascripts/gmaps/base/base.coffee
gmaps4rails-2.0.3 vendor/assets/javascripts/gmaps/base/base.coffee
gmaps4rails-2.0.2 vendor/assets/javascripts/gmaps/base/base.coffee
gmaps4rails-2.0.1 vendor/assets/javascripts/gmaps/base/base.coffee
gmaps4rails-2.0.0 vendor/assets/javascripts/gmaps/base/base.coffee