Module: Interest::Base

Extended by:
ActiveSupport::Concern
Defined in:
lib/interest/base.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#blockable?(other) ⇒ Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/interest/base.rb', line 18

def blockable?(other)
  is_a?(Interest::Blockable::Blocker) and other.is_a?(Interest::Blockable::Blockee)
end

#blockee?Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/interest/base.rb', line 42

def blockee?
  is_a? Interest::Blockable::Blockee
end

#blocker?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/interest/base.rb', line 38

def blocker?
  is_a? Interest::Blockable::Blocker
end

#follow_requestable?(other) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/interest/base.rb', line 14

def follow_requestable?(other)
  followable?(other) and is_a?(Interest::FollowRequestable::FollowRequester) and other.is_a?(Interest::FollowRequestable::FollowRequestee)
end

#follow_requestee?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/interest/base.rb', line 34

def follow_requestee?
  is_a? Interest::FollowRequestable::FollowRequestee
end

#follow_requester?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/interest/base.rb', line 30

def follow_requester?
  is_a? Interest::FollowRequestable::FollowRequester
end

#followable?(other) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/interest/base.rb', line 10

def followable?(other)
  is_a?(Interest::Followable::Follower) and other.is_a?(Interest::Followable::Followee)
end

#followee?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/interest/base.rb', line 26

def followee?
  is_a? Interest::Followable::Followee
end

#follower?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/interest/base.rb', line 22

def follower?
  is_a? Interest::Followable::Follower
end