Method: TagExtractor::StringExtractor#extract
- Defined in:
- lib/tag_extractor.rb
#extract(separator = nil, container = nil, opts = { multiword: true }) ⇒ Object
Public: Extract tags, removing their separators.
separator - A String separator to use for tag extraction.
If none specified, it will default to the global separator.
container - A String container to use for tag extraction.
If none specified, it will default to the default container.
opts - A Hash with options for the extraction (default: { multiword => true } ).
:multiword - A Boolean to indicate if multiple words tags are to be extracted.
Returns an Array of tags without separators : [“tag1”, “long tag”, “tag2”]
102 103 104 105 |
# File 'lib/tag_extractor.rb', line 102 def extract(separator = nil, container = nil, opts = { multiword: true }) = extract_with_separator(separator, container, opts) remove_separators_in(, container: container) end |