Class: ShoppingCart::DeliveryDecorator
- Inherits:
-
Drape::Decorator
- Object
- Drape::Decorator
- ShoppingCart::DeliveryDecorator
- Defined in:
- app/decorators/shopping_cart/delivery_decorator.rb
Instance Method Summary collapse
Instance Method Details
#full_info ⇒ Object
9 10 11 |
# File 'app/decorators/shopping_cart/delivery_decorator.rb', line 9 def full_info "#{object.title} + #{price_in_currency}" end |
#full_info_list ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'app/decorators/shopping_cart/delivery_decorator.rb', line 13 def full_info_list h.capture_haml do h.haml_tag :ul, class: 'list-unstyled' do h.haml_tag(:li) { h.haml_concat object.title } h.haml_tag(:li) { h.haml_concat price_in_currency } end end end |
#price_in_currency ⇒ Object
5 6 7 |
# File 'app/decorators/shopping_cart/delivery_decorator.rb', line 5 def price_in_currency h.number_to_currency object.price end |