Sha256: bd68f39dc8c7351d35d2504bd53a4c487e7e1008ad16f5ffd35adaf2f3e9334c

Contents?: true

Size: 598 Bytes

Versions: 4

Compression:

Stored size: 598 Bytes

Contents

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)
          unless match_data.is_a? MatchData
            raise ArgumentError, 'match_data should be a type of MatchData'
          end
          @match_data = match_data
          @attachment = attachment
          @attachment_field = attachment_field
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
slack-ruby-bot-0.12.0 lib/slack-ruby-bot/commands/support/match.rb
slack-ruby-bot-0.11.2 lib/slack-ruby-bot/commands/support/match.rb
slack-ruby-bot-0.11.1 lib/slack-ruby-bot/commands/support/match.rb
slack-ruby-bot-0.11.0 lib/slack-ruby-bot/commands/support/match.rb