class Bonita::Utils::UpdateHandler

Public Class Methods

new(object, mapper) click to toggle source
# File lib/bonita/utils.rb, line 54
def initialize(object, mapper)
  @object = object
  @mapper = mapper
end

Public Instance Methods

call() click to toggle source
# File lib/bonita/utils.rb, line 59
def call
  if @object.is_a? Hash
    JSON.dump @object
  else
    @mapper.representation_for(:update, @object)
  end
end