Class: Watcher

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document, Mongoid::Timestamps
Defined in:
app/models/watcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#watcher_typeObject

Returns the value of attribute watcher_type


14
15
16
# File 'app/models/watcher.rb', line 14

def watcher_type
  @watcher_type
end

Instance Method Details

#addressObject


24
25
26
# File 'app/models/watcher.rb', line 24

def address
  user.try(:email) || email
end

#labelObject


20
21
22
# File 'app/models/watcher.rb', line 20

def label
  user ? user.name : email
end