Sha256: ec0d8b6f5fa3759145be7137bd7207cc78aa7b52e32e289d08255db7e372e3ad
Contents?: true
Size: 839 Bytes
Versions: 35
Compression:
Stored size: 839 Bytes
Contents
class SimpleAdapter < SourceAdapter # initialize method created by source generator (Rhoconnect version < 2.2.0) def initialize(source,credential) super(source,credential) end def login unless _is_empty?(current_user.login) true else raise SourceAdapterLoginException.new('Error logging in') end end def query(params=nil) @result end def search(params=nil,txt='') params[:foo] = 'bar' # this is for 'chaining' test if params['search'] == 'bar' @result = {'obj'=>{'foo'=>'bar'}} # this is for 'chaining' test, addind 'iPhone' to trogger Sample adapter search result params['name'] = 'iPhone' end @result end def sync super end def create(create_hash) 'obj4' end private def _is_empty?(str) str.length <= 0 end end
Version data entries
35 entries across 35 versions & 1 rubygems