Sha256: fdbd29d0f9d6be591c5938989e0196320022b20ba553178bda0eed180d726c02

Contents?: true

Size: 474 Bytes

Versions: 7

Compression:

Stored size: 474 Bytes

Contents

module Boty
  class Message
    attr_accessor :text, :user, :channel, :ts, :team
    attr_reader :match

    def initialize(data, match: nil)
      @id = data["user"]
      @text = data["text"]
      @user = data["user"]
      @channel = data["channel"]
      @ts = data["ts"]
      @team = data["team"]
      @match = match
    end

    def from?(author)
      if author.respond_to? :id
        @id == author.id
      else
        @id == author
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
boty-0.0.9 lib/boty/message.rb
boty-0.0.7 lib/boty/message.rb
boty-0.0.6 lib/boty/message.rb
boty-0.0.4 lib/boty/message.rb
boty-0.0.3 lib/boty/message.rb
boty-0.0.2 lib/boty/message.rb
boty-0.0.1 lib/boty/message.rb