Class: Safubot::Query

Inherits:
Object
  • Object
show all
Includes:
MongoMapper::Document
Defined in:
lib/safubot/test_helper.rb

Overview

Generic mediumless Request source.

Instance Method Summary collapse

Instance Method Details

#make_requestObject

Find or create a Request sourced from this Query.



52
53
54
# File 'lib/safubot/test_helper.rb', line 52

def make_request
	  self.request || self.request = Request.create(:user => self.user, :text => self.text, :source => self)
end

#usernameObject



56
57
58
# File 'lib/safubot/test_helper.rb', line 56

def username
  self.user.name
end