Fix easy rubocop issues

This commit is contained in:
Luis Ramos
2020-07-10 16:18:44 +01:00
parent 58da11fde7
commit 56b83b6bb5
4 changed files with 13 additions and 6 deletions

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Spree
module Core
class Environment
@@ -9,4 +11,3 @@ module Spree
end
end
end

View File

@@ -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

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Spree
module ViewContext
def self.context=(context)

View File

@@ -1 +1,3 @@
Spree::BaseController.send(:include, Spree::ViewContext)
# frozen_string_literal: true
Spree::BaseController.__send__(:include, Spree::ViewContext)