Class: SlackRubyBot::Commands::Support::Match

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/slack-ruby-bot/commands/support/match.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(match_data, attachment = nil, attachment_field = nil) ⇒ Match

Returns a new instance of Match.

Raises:

  • (ArgumentError)


13
14
15
16
17
18
19
# File 'lib/slack-ruby-bot/commands/support/match.rb', line 13

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

Instance Attribute Details

#attachmentObject (readonly)

Returns the value of attribute attachment.



11
12
13
# File 'lib/slack-ruby-bot/commands/support/match.rb', line 11

def attachment
  @attachment
end

#attachment_fieldObject (readonly)

Returns the value of attribute attachment_field.



11
12
13
# File 'lib/slack-ruby-bot/commands/support/match.rb', line 11

def attachment_field
  @attachment_field
end