Sha256: dacc096eb4930b9cea91942b7f664a18f53787ce233da4a3830bd2ae0f2031af

Contents?: true

Size: 604 Bytes

Versions: 7

Compression:

Stored size: 604 Bytes

Contents

# frozen_string_literal: true

module SlackRubyBot
  module Commands
    module Support
      class Match
        extend Forwardable

        delegate MatchData.public_instance_methods(false) => :@match_data

        attr_reader :attachment, :attachment_field

        def initialize(match_data, attachment = nil, attachment_field = nil)
          raise ArgumentError, 'match_data should be a type of MatchData' unless match_data.is_a? MatchData

          @match_data = match_data
          @attachment = attachment
          @attachment_field = attachment_field
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
slackrb-0.17.1 lib/slack-ruby-bot/commands/support/match.rb
slackrb-0.17.0 lib/slack-ruby-bot/commands/support/match.rb
slack-ruby-bot-0.16.1 lib/slack-ruby-bot/commands/support/match.rb
slack-ruby-bot-0.16.0 lib/slack-ruby-bot/commands/support/match.rb
slack-ruby-bot-0.15.0 lib/slack-ruby-bot/commands/support/match.rb
slack-ruby-bot-0.14.0 lib/slack-ruby-bot/commands/support/match.rb
slack-ruby-bot-0.13.0 lib/slack-ruby-bot/commands/support/match.rb