Sha256: c0b76143b7e0625675426be08dd7a83daf129461962be715a9accbe26a0bde19

Contents?: true

Size: 260 Bytes

Versions: 3

Compression:

Stored size: 260 Bytes

Contents

module ShoppingCart
  class AddDeliveryGenerator < Rails::Generators::Base
  
    argument :title, type: :string
    argument :price, type: :string

    def create_delivery_method
      ShoppingCart::Delivery.create title: title, price: price
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
shopping-cart-0.1.2 lib/generators/shopping_cart/add_delivery/add_delivery_generator.rb
shopping-cart-0.1.1 lib/generators/shopping_cart/add_delivery/add_delivery_generator.rb
shopping-cart-0.1.0 lib/generators/shopping_cart/add_delivery/add_delivery_generator.rb