Class: SlackTrello::TextParser
- Inherits:
-
Object
- Object
- SlackTrello::TextParser
- Defined in:
- lib/slack_trello/text_parser.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
- #args ⇒ Object
-
#initialize(text, options = {}) ⇒ TextParser
constructor
A new instance of TextParser.
- #text_message ⇒ Object
- #valid_text_format? ⇒ Boolean
Constructor Details
#initialize(text, options = {}) ⇒ TextParser
5 6 7 8 |
# File 'lib/slack_trello/text_parser.rb', line 5 def initialize(text, = {}) @text = text @required_arguments = .fetch(:required_arguments, nil) end |
Instance Attribute Details
#text ⇒ Object (readonly)
Returns the value of attribute text.
3 4 5 |
# File 'lib/slack_trello/text_parser.rb', line 3 def text @text end |
Instance Method Details
#args ⇒ Object
10 11 12 |
# File 'lib/slack_trello/text_parser.rb', line 10 def args matched_text[1].strip.split(" ") end |
#text_message ⇒ Object
14 15 16 |
# File 'lib/slack_trello/text_parser.rb', line 14 def matched_text[2].strip end |
#valid_text_format? ⇒ Boolean
18 19 20 |
# File 'lib/slack_trello/text_parser.rb', line 18 def valid_text_format? !!matched_text end |