Skip to content

Commit

Permalink
Rename AttributesConcern to Attributable
Browse files Browse the repository at this point in the history
  • Loading branch information
apexatoll committed Nov 15, 2023
1 parent c732ba8 commit 895a7dc
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Kangaru
module AttributesConcern
module Attributable
extend Concern

class_methods do
Expand Down
2 changes: 1 addition & 1 deletion lib/kangaru/configurator.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Kangaru
class Configurator
include AttributesConcern
include Attributable
include Validatable

using Patches::Inflections
Expand Down
2 changes: 1 addition & 1 deletion lib/kangaru/database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Kangaru
class Database
extend Forwardable

include AttributesConcern
include Attributable

PLUGINS = %i[
enum
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Kangaru
module AttributesConcern
module Attributable
extend Concern

module ClassMethods
Expand Down
4 changes: 2 additions & 2 deletions sig/kangaru/configurator.rbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Kangaru
class Configurator
include AttributesConcern
extend AttributesConcern::ClassMethods
include Attributable
extend Attributable::ClassMethods

include Validatable
extend Validatable::ClassMethods
Expand Down
4 changes: 2 additions & 2 deletions sig/kangaru/database.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ module Kangaru
class Database
extend Forwardable

include AttributesConcern
extend AttributesConcern::ClassMethods
include Attributable
extend Attributable::ClassMethods

PLUGINS: Array[Symbol]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
RSpec.describe Kangaru::AttributesConcern do
RSpec.describe Kangaru::Attributable do
subject(:model) { model_class.new(**attributes) }

shared_context :no_attributes_defined do
let(:model_class) do
Class.new { include Kangaru::AttributesConcern }
Class.new { include Kangaru::Attributable }
end
end

shared_context :attributes_defined do
let(:model_class) do
Class.new do
include Kangaru::AttributesConcern
include Kangaru::Attributable

attr_accessor :foo, :bar, :baz
end
Expand Down

0 comments on commit 895a7dc

Please sign in to comment.