Sha256: 2e6426143f07a8f1fee240fc7590f8013e492ccb1a12658f577be9eef97ece62
Contents?: true
Size: 817 Bytes
Versions: 23
Compression:
Stored size: 817 Bytes
Contents
class SimpleAdapter < SourceAdapter # initialize method created by source generator (Rhoconnect version < 2.2.0) def initialize(source) super(source) 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
23 entries across 23 versions & 1 rubygems