Class: Safubot::Query
- Inherits:
-
Object
- Object
- Safubot::Query
- Includes:
- MongoMapper::Document
- Defined in:
- lib/safubot/test_helper.rb
Overview
Generic mediumless Request source.
Instance Method Summary collapse
-
#make_request ⇒ Object
Find or create a Request sourced from this Query.
- #username ⇒ Object
Instance Method Details
#make_request ⇒ Object
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 |
#username ⇒ Object
56 57 58 |
# File 'lib/safubot/test_helper.rb', line 56 def username self.user.name end |