Class: TTYHue::Parser::Tag
- Inherits:
-
Object
- Object
- TTYHue::Parser::Tag
- Defined in:
- lib/ttyhue/parser/tag.rb
Instance Method Summary collapse
- #closing ⇒ Object
-
#initialize(str) ⇒ Tag
constructor
A new instance of Tag.
- #valid? ⇒ Boolean
Constructor Details
#initialize(str) ⇒ Tag
Returns a new instance of Tag.
5 6 7 8 9 |
# File 'lib/ttyhue/parser/tag.rb', line 5 def initialize(str) @str = str @match_data = str.match(regexp) return unless @match_data end |
Instance Method Details
#closing ⇒ Object
15 16 17 |
# File 'lib/ttyhue/parser/tag.rb', line 15 def closing @match_data[:closing] != "" end |
#valid? ⇒ Boolean
11 12 13 |
# File 'lib/ttyhue/parser/tag.rb', line 11 def valid? !!@match_data end |