Class: Jasonette::Items
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #image(uri = nil) ⇒ Object
- #label(caption = nil) ⇒ Object
- #layout(orientation = "vertical") ⇒ Object
Methods inherited from Base
#action, #attr_value, #attributes!, #empty?, #encode, #implicit_set!, #initialize, #inline, #inline!, #klass, #method_missing, #reload!, #render!, #success, #target!, #trigger, #with_attributes
Methods included from Properties
included, #klass_for_property, #merge_properties, #prop, #properties, #properties_empty?, #property_get!, #property_sender, #property_set!
Constructor Details
This class inherits a constructor from Jasonette::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Jasonette::Base
Instance Method Details
#image(uri = nil) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/jasonette/core/items.rb', line 13 def image uri=nil item = Jasonette::Base.new(@context) do type "image" url uri unless uri.nil? with_attributes { instance_eval(&::Proc.new) } if block_given? end append item end |