diff options
author | Alessandro Desantis <desa.alessandro@gmail.com> | 2020-09-24 14:23:54 +0200 |
---|---|---|
committer | Alessandro Desantis <desa.alessandro@gmail.com> | 2020-09-25 11:52:52 +0200 |
commit | a98ab3aeefca1b679376b6e05b91f5a516f8d802 (patch) | |
tree | 74312a78db6d2948d9d6129c9823c82195ea9072 /app/services/solidus_subscriptions/line_item_builder.rb | |
parent | c2ff76ed6f1b9aa377f566d7d98e743446919c0a (diff) |
Fix coding style violations
Diffstat (limited to 'app/services/solidus_subscriptions/line_item_builder.rb')
-rw-r--r-- | app/services/solidus_subscriptions/line_item_builder.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/services/solidus_subscriptions/line_item_builder.rb b/app/services/solidus_subscriptions/line_item_builder.rb index b288629..1d3ea9b 100644 --- a/app/services/solidus_subscriptions/line_item_builder.rb +++ b/app/services/solidus_subscriptions/line_item_builder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This class is responsible for taking SubscriptionLineItems and building # them into Spree::LineItems which can be added to an order module SolidusSubscriptions @@ -22,7 +24,7 @@ module SolidusSubscriptions line_items = subscription_line_items.map do |subscription_line_item| variant = subscribables.fetch(subscription_line_item.subscribable_id) - raise UnsubscribableError.new(variant) unless variant.subscribable? + raise UnsubscribableError, variant unless variant.subscribable? next unless variant.can_supply?(subscription_line_item.quantity) ::Spree::LineItem.new(variant: variant, quantity: subscription_line_item.quantity) |