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.
120 121 122 123 124 |
# File 'lib/oembed_links/template_resolver.rb', line 120 def initialize(u, d, r) @url = u @data = d @response = r end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
118 119 120 |
# File 'lib/oembed_links/template_resolver.rb', line 118 def data @data end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
118 119 120 |
# File 'lib/oembed_links/template_resolver.rb', line 118 def response @response end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
118 119 120 |
# File 'lib/oembed_links/template_resolver.rb', line 118 def url @url end |
Instance Method Details
#evaluate(contents) ⇒ Object
127 128 129 |
# File 'lib/oembed_links/template_resolver.rb', line 127 def evaluate(contents) ERB.new(contents).result(binding) end |