Module: Mention
- Included in:
- JiraIssue
- Defined in:
- lib/mention.rb
Instance Method Summary collapse
Instance Method Details
#mentioned! ⇒ Object
17 18 19 |
# File 'lib/mention.rb', line 17 def mentioned! @redis.set(@name, Time.now.utc) end |
#mentioned_recently? ⇒ Boolean
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/mention.rb', line 4 def mentioned_recently? now = Time.now.utc mention = @redis.get(@name) return false unless mention mention = Time.parse(mention) mention ||= now last_seen = (now - mention) Lita.logger.info "#{@name} last mentioned at #{mention}, now #{now}, diff #{last_seen}" return last_seen < Lita.config.handlers.jira_issues.timeout end |