mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-06 07:29:16 +00:00
Fix easy rubocop issues
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Spree
|
||||
module Core
|
||||
class Environment
|
||||
@@ -9,4 +11,3 @@ module Spree
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Spree
|
||||
module Core
|
||||
module EnvironmentExtension
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
def add_class(name)
|
||||
self.instance_variable_set "@#{name}", Set.new
|
||||
instance_variable_set "@#{name}", Set.new
|
||||
|
||||
create_method( "#{name}=".to_sym ) { |val|
|
||||
instance_variable_set( "@" + name, val)
|
||||
@@ -17,9 +19,9 @@ module Spree
|
||||
|
||||
private
|
||||
|
||||
def create_method(name, &block)
|
||||
self.class.send(:define_method, name, &block)
|
||||
end
|
||||
def create_method(name, &block)
|
||||
self.class.__send__(:define_method, name, &block)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Spree
|
||||
module ViewContext
|
||||
def self.context=(context)
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
Spree::BaseController.send(:include, Spree::ViewContext)
|
||||
# frozen_string_literal: true
|
||||
|
||||
Spree::BaseController.__send__(:include, Spree::ViewContext)
|
||||
|
||||
Reference in New Issue
Block a user