Class: Bookit::Content::Image
- Defined in:
- lib/bookit/content/image.rb
Instance Attribute Summary collapse
-
#source ⇒ Object
Returns the value of attribute source.
Attributes inherited from Generic
Instance Method Summary collapse
-
#initialize(source, options = {}) ⇒ Image
constructor
takes a source url.
-
#render ⇒ Object
returns the url to the image.
Methods inherited from Generic
Constructor Details
#initialize(source, options = {}) ⇒ Image
takes a source url
9 10 11 12 13 |
# File 'lib/bookit/content/image.rb', line 9 def initialize(source, ={}) @source = source super end |
Instance Attribute Details
#source ⇒ Object
Returns the value of attribute source.
6 7 8 |
# File 'lib/bookit/content/image.rb', line 6 def source @source end |
Instance Method Details
#render ⇒ Object
returns the url to the image
16 17 18 |
# File 'lib/bookit/content/image.rb', line 16 def render [open(source), attributes] end |