Module: Waylon::User Abstract

Includes:
Comparable
Included in:
RSpec::TestUser
Defined in:
lib/waylon/user.rb

Overview

This module is abstract.

Abstract User module

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object

Extends the base class when included



8
9
10
# File 'lib/waylon/user.rb', line 8

def self.included(base)
  base.extend ClassMethods
end

Instance Method Details

#<=>(other) ⇒ Object



42
43
44
# File 'lib/waylon/user.rb', line 42

def <=>(other)
  id <=> other.id
end

#emailObject

Meant to provide the User’s email



47
48
49
# File 'lib/waylon/user.rb', line 47

def email
  nil
end

#handleObject

Meant to provide the User’s handle



52
53
54
# File 'lib/waylon/user.rb', line 52

def handle
  nil
end

#idObject

Meant to provide the User’s id from the underlying Sense platform



57
58
59
# File 'lib/waylon/user.rb', line 57

def id
  @id
end

#initialize(id) ⇒ Object



38
39
40
# File 'lib/waylon/user.rb', line 38

def initialize(id)
  @id = id
end

#valid?Boolean

Meant to determine if the User’s is “real” per the Sense platform

Returns:

  • (Boolean)


62
63
64
# File 'lib/waylon/user.rb', line 62

def valid?
  true
end