   @param  {function}  A function to execute each time the object is changed.
   @return {object}    A object observe state.
   ###
-  @observe: (callback) ->
+  @observe: (callback, events = DEFAULT_EVENTS) ->
     @observer = Object.observe @records, (states) ->
       callback state for state in states
+    , events
 
   ###
-  Observe changes in instance repository.
-  @method observe
-  @param  {function}  A function to execute each time the object is changed.
+  Unobserve changes in instance repository.
+  @method unobserve
   @return {object}    A object observe state.
   ###
   @unobserve: ->

@author Javier Jimenez Villar <javi.jimenez.villar@gmail.com> || @soyjavi
###
"use strict"

class window.Hamsa


  @param  {function}  A function to execute each time the fields change.
  @return {object}    A object observe state.
  ###
  observe: (callback, events = DEFAULT_EVENTS) ->
    @observer = Object.observe @fields, (states) ->
      callback state for state in states
    , events

  ###
  Unobserve changes in a determinate Hamsa instance.
  @method unobserve
  @return {object}    A object observe state.
  ###
  unobserve: ->
    Object.unobserve @fields, @observer


# -- PRIVATE -------------------------------------------------------------------
