class Softlayer::Mock::Brand

Public Class Methods

create_object(attrs) click to toggle source
# File lib/softlayer/mock/brand.rb, line 13
def self.create_object(attrs)
  brand = add_attributes(attrs)
  save_on_database(brand.key_name, brand)
end

Public Instance Methods

get_hardware() click to toggle source
# File lib/softlayer/mock/brand.rb, line 24
def get_hardware
end
get_token(user_id) click to toggle source
# File lib/softlayer/mock/brand.rb, line 4
def get_token(user_id)
  users = $database["Softlayer::User::Customer"]
  users.each do |id,user|
    if user.id == user_id
      return user.authentication_token.hash
    end
  end
end
get_users() click to toggle source
# File lib/softlayer/mock/brand.rb, line 18
def get_users
  return_objects = []
  $database["Softlayer::User::Customer"].select { |k,v| return_objects.push(v) }
  return_objects
end