Class: Cejo::Media::Parser
- Inherits:
-
Object
- Object
- Cejo::Media::Parser
- Defined in:
- lib/cejo/media/get/parser.rb
Overview
Parse information using grabber
Instance Attribute Summary collapse
-
#current ⇒ Object
readonly
Returns the value of attribute current.
-
#fmt ⇒ Object
Returns the value of attribute fmt.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #base ⇒ Object
-
#initialize(current, url) ⇒ Parser
constructor
A new instance of Parser.
- #new_format ⇒ Object
- #result ⇒ Object
Constructor Details
#initialize(current, url) ⇒ Parser
Returns a new instance of Parser.
12 13 14 15 |
# File 'lib/cejo/media/get/parser.rb', line 12 def initialize(current, url) @current = current @url = url end |
Instance Attribute Details
#current ⇒ Object (readonly)
Returns the value of attribute current.
9 10 11 |
# File 'lib/cejo/media/get/parser.rb', line 9 def current @current end |
#fmt ⇒ Object
Returns the value of attribute fmt.
10 11 12 |
# File 'lib/cejo/media/get/parser.rb', line 10 def fmt @fmt end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
9 10 11 |
# File 'lib/cejo/media/get/parser.rb', line 9 def url @url end |
Instance Method Details
#base ⇒ Object
21 22 23 |
# File 'lib/cejo/media/get/parser.rb', line 21 def base "#{current.name} #{current.parser} '#{new_format}' #{url}" end |
#new_format ⇒ Object
17 18 19 |
# File 'lib/cejo/media/get/parser.rb', line 17 def new_format current.send fmt.to_sym end |
#result ⇒ Object
25 26 27 |
# File 'lib/cejo/media/get/parser.rb', line 25 def result `""#{base}""`.strip end |