Class: Wee::Brush::ImageTag
- Inherits:
-
GenericSingleTagBrush
- Object
- Wee::Brush
- GenericTagBrush
- GenericSingleTagBrush
- Wee::Brush::ImageTag
- Defined in:
- lib/wee/renderer/html/brushes.rb
Instance Attribute Summary
Attributes inherited from Wee::Brush
Instance Method Summary collapse
-
#initialize ⇒ ImageTag
constructor
A new instance of ImageTag.
-
#src_for(prop) ⇒ Object
This method construct the src attribute by looking up the property from the current component.
- #with ⇒ Object
Methods inherited from GenericTagBrush
#__action_callback, #__actionurl_callback, #__actionurl_named_callback, #__input_callback, #css_class, #css_class_for, #method_missing, #onclick_callback, #onclick_update
Methods inherited from Wee::Brush
Constructor Details
#initialize ⇒ ImageTag
Returns a new instance of ImageTag.
207 208 209 |
# File 'lib/wee/renderer/html/brushes.rb', line 207 def initialize super("img") end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Wee::Brush::GenericTagBrush
Instance Method Details
#src_for(prop) ⇒ Object
This method construct the src attribute by looking up the property from the current component.
201 202 203 204 205 |
# File 'lib/wee/renderer/html/brushes.rb', line 201 def src_for(prop) val = @canvas.current_component.lookup_property(prop) raise "no property found for: <#{ prop }>" if val.nil? src(val) end |
#with ⇒ Object
211 212 213 |
# File 'lib/wee/renderer/html/brushes.rb', line 211 def with super end |