Class: UltimateLyrics::Provider::ExtractItem
- Inherits:
-
Item
- Object
- Item
- UltimateLyrics::Provider::ExtractItem
show all
- Defined in:
- lib/ultimate_lyrics/provider/extract_item.rb
Constant Summary
Constants inherited
from Item
Item::METHODS_ATTRIBUTES, Item::TAG_NAME_PARSER
Instance Method Summary
collapse
Methods inherited from Item
#apply, #delimiters?, #tag_name, #to_s
Instance Method Details
#apply_from_delimiters(source) ⇒ Object
8
9
10
|
# File 'lib/ultimate_lyrics/provider/extract_item.rb', line 8
def apply_from_delimiters(source)
source.delimited_inner(begin_with, end_with)
end
|
#apply_from_tag(source) ⇒ Object
12
13
14
|
# File 'lib/ultimate_lyrics/provider/extract_item.rb', line 12
def apply_from_tag(source)
source.delimited_inner(tag, "</#{tag_name}>")
end
|
#apply_from_url(source) ⇒ Object
16
17
18
|
# File 'lib/ultimate_lyrics/provider/extract_item.rb', line 16
def apply_from_url(source)
url.gsub('{id}', source)
end
|