Class: OEmbed::TemplateResolver::ERBTemplate
- Inherits:
-
Object
- Object
- OEmbed::TemplateResolver::ERBTemplate
- Defined in:
- lib/oembed_links/template_resolver.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #evaluate(contents) ⇒ Object
-
#initialize(u, d, r) ⇒ ERBTemplate
constructor
A new instance of ERBTemplate.
Constructor Details
#initialize(u, d, r) ⇒ ERBTemplate
Returns a new instance of ERBTemplate.
115 116 117 118 119 |
# File 'lib/oembed_links/template_resolver.rb', line 115 def initialize(u, d, r) @url = u @data = d @response = r end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
113 114 115 |
# File 'lib/oembed_links/template_resolver.rb', line 113 def data @data end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
113 114 115 |
# File 'lib/oembed_links/template_resolver.rb', line 113 def response @response end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
113 114 115 |
# File 'lib/oembed_links/template_resolver.rb', line 113 def url @url end |
Instance Method Details
#evaluate(contents) ⇒ Object
122 123 124 |
# File 'lib/oembed_links/template_resolver.rb', line 122 def evaluate(contents) ERB.new(contents).result(binding) end |