Class: Mooset::Endpoints::Null::UserSearch

Inherits:
Resource
  • Object
show all
Defined in:
lib/mooset/endpoints/null/user_search.rb

Instance Method Summary collapse

Methods included from Findable

included

Instance Method Details

#create(u) ⇒ Object



5
6
7
# File 'lib/mooset/endpoints/null/user_search.rb', line 5

def create(u)
  User.new(id: u.id, username: u.username, email: u.email)
end

#find_from_hash(hash) ⇒ Object



13
14
15
# File 'lib/mooset/endpoints/null/user_search.rb', line 13

def find_from_hash(hash)
  User.new(hash)
end

#find_from_object(object, *args) ⇒ Object



17
18
19
# File 'lib/mooset/endpoints/null/user_search.rb', line 17

def find_from_object(object, *args)
  User.new(object.attributes)
end

#import(from, *args) ⇒ Object



9
10
11
# File 'lib/mooset/endpoints/null/user_search.rb', line 9

def import(from, *args)
  User.new(args)
end