Skip to content

Commit

Permalink
Rename module (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
leonovk committed Dec 11, 2023
1 parent 4cc9077 commit 450e99b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/active_yaml.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

require_relative 'active_yaml/parser'
require_relative 'active_yaml/method_mapper'
require_relative 'active_yaml/method_mapping'
require_relative 'active_yaml/factory_hash'
require_relative 'active_yaml/class_methods'

Expand All @@ -11,7 +11,7 @@ module ActiveYaml

# Base class to inherit from to create models
class BaseModel
include MethodMapper
include MethodMapping

def self.yaml(file_path)
define_method(:yaml_data) do
Expand Down
4 changes: 2 additions & 2 deletions lib/active_yaml/class_methods.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# frozen_string_literal: true

require_relative 'method_mapper'
require_relative 'method_mapping'
require_relative 'parser'

module ActiveYaml
# A module that allows you to use this gem,
# without creating instances of the class
module ClassMethods
include MethodMapper
include MethodMapping

def yaml(file_path)
define_singleton_method(:yaml_data) do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
module ActiveYaml
# A module containing methods that allow you to track method calls,
# and compare them with data from the YML file
module MethodMapper
module MethodMapping
def method_missing(method, *args, &)
value = yaml_data[method.to_s]

Expand Down
2 changes: 1 addition & 1 deletion lib/active_yaml/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module ActiveYaml
VERSION = '1.2.0'
VERSION = '1.2.1'
end

0 comments on commit 450e99b

Please sign in to comment.