Module: Taggart
- Defined in:
- lib/taggart.rb
Overview
Taggart surrounds your strings with HTML tags.
Author: Jocke Selin <[email protected]>
@jockeselin
Date: 2012-10-10
Version: 0.0.8 Build 013
Github: https://github.com/jocke/taggart
Defined Under Namespace
Constant Summary collapse
- VERSION =
'0.0.8'- BUILD =
'013'- CLOSED_TAG =
' /'- OPEN_TAG =
''
Class Method Summary collapse
- .build ⇒ Object
- .close_ending_tag ⇒ Object
- .end_tag_closed? ⇒ Boolean
- .end_tag_open? ⇒ Boolean
-
.end_tag_status? ⇒ Boolean
Returns true if the tags are open, false if they’re closed.
- .help ⇒ Object
- .open_ending_tag ⇒ Object
- .single_tags ⇒ Object
- .special_tags ⇒ Object
- .standard_tags ⇒ Object
- .tags ⇒ Object
- .version ⇒ Object
Instance Method Summary collapse
Class Method Details
.build ⇒ Object
27 28 29 |
# File 'lib/taggart.rb', line 27 def self.build BUILD end |
.close_ending_tag ⇒ Object
65 66 67 68 |
# File 'lib/taggart.rb', line 65 def self.close_ending_tag @current_close_tag = CLOSED_TAG true end |
.end_tag_closed? ⇒ Boolean
57 58 59 |
# File 'lib/taggart.rb', line 57 def self.end_tag_closed? (end_tag_status? == :closed) end |
.end_tag_open? ⇒ Boolean
61 62 63 |
# File 'lib/taggart.rb', line 61 def self.end_tag_open? (end_tag_status? == :open) end |
.end_tag_status? ⇒ Boolean
Returns true if the tags are open, false if they’re closed
53 54 55 |
# File 'lib/taggart.rb', line 53 def self.end_tag_status? (@current_close_tag == OPEN_TAG) ? :open : :closed end |
.help ⇒ Object
31 32 33 |
# File 'lib/taggart.rb', line 31 def self.help TaggartHelp.help end |
.open_ending_tag ⇒ Object
70 71 72 73 |
# File 'lib/taggart.rb', line 70 def self.open_ending_tag @current_close_tag = OPEN_TAG true end |
.single_tags ⇒ Object
47 48 49 |
# File 'lib/taggart.rb', line 47 def self. Taggart::String::SINGLE_TAGS end |
.special_tags ⇒ Object
43 44 45 |
# File 'lib/taggart.rb', line 43 def self. Taggart::String::SPECIAL_TAGS end |
.standard_tags ⇒ Object
39 40 41 |
# File 'lib/taggart.rb', line 39 def self. Taggart::String::STANDARD_TAGS end |
.tags ⇒ Object
35 36 37 |
# File 'lib/taggart.rb', line 35 def self. TaggartHelp. end |
.version ⇒ Object
23 24 25 |
# File 'lib/taggart.rb', line 23 def self.version VERSION end |
Instance Method Details
#initialize ⇒ Object
19 20 21 |
# File 'lib/taggart.rb', line 19 def initialize @current_close_tag = OPEN_TAG end |