activeyaml 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d6f31a30be9442d2006d3a021c8c67e094cd85fe4836b64772126011e3c30dd
4
- data.tar.gz: 36e100c38e94324625d7497660710b008fd02425d23b482b027ebe544920766f
3
+ metadata.gz: 1c14e874ae5a4bc7bdb26e0ad28b530481bee38a544943f0ac4caa9d0ea7c9c2
4
+ data.tar.gz: e3ed19ceb491d9560834fbc0666f7a5d71efa947411cf8143765b7b1a9877540
5
5
  SHA512:
6
- metadata.gz: ec1821333bd0ea118fa3bd0c9e46316557513272c9f012b5ba878b91f8bcf27801eb31ec4dd731b8465e2280dff5856387c08d3df0af7974a1dd4b6fe94dee20
7
- data.tar.gz: 70b1d65e75e4f7ae1c3246e7dedd3ff098e5ba59daac803686d725448b2ad3d4c850934c0bd85838b524ca7f0fa60d29b570c8e714761df8625784749fcf25a0
6
+ metadata.gz: e3ac4d370a59702c0b8482001d0cc77fa7619528a8f58650d09c8994624295a6f869925b9a8619e5f8cd49fab7fd922ad193d69877e755fcb6e2eb07df4f8e4e
7
+ data.tar.gz: 0e7214d66421768b5726f4913458ebaf5720956a167f5997bd78c71c246ddf2a1a617256f65fbdd8324c77d56e049f28fcc1e57dc0f459c162a80eb78a10b9a6
@@ -1,12 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'method_mapper'
3
+ require_relative 'method_mapping'
4
4
  require_relative 'parser'
5
5
 
6
6
  module ActiveYaml
7
- # no doc
7
+ # A module that allows you to use this gem,
8
+ # without creating instances of the class
8
9
  module ClassMethods
9
- include MethodMapper
10
+ include MethodMapping
10
11
 
11
12
  def yaml(file_path)
12
13
  define_singleton_method(:yaml_data) do
@@ -3,8 +3,9 @@
3
3
  require_relative 'yaml_hash'
4
4
 
5
5
  module ActiveYaml
6
- # no doc
7
- module MethodMapper
6
+ # A module containing methods that allow you to track method calls,
7
+ # and compare them with data from the YML file
8
+ module MethodMapping
8
9
  def method_missing(method, *args, &)
9
10
  value = yaml_data[method.to_s]
10
11
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveYaml
4
- VERSION = '1.2.0'
4
+ VERSION = '1.2.1'
5
5
  end
data/lib/active_yaml.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'active_yaml/parser'
4
- require_relative 'active_yaml/method_mapper'
4
+ require_relative 'active_yaml/method_mapping'
5
5
  require_relative 'active_yaml/factory_hash'
6
6
  require_relative 'active_yaml/class_methods'
7
7
 
@@ -11,7 +11,7 @@ module ActiveYaml
11
11
 
12
12
  # Base class to inherit from to create models
13
13
  class BaseModel
14
- include MethodMapper
14
+ include MethodMapping
15
15
 
16
16
  def self.yaml(file_path)
17
17
  define_method(:yaml_data) do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeyaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirill Leonov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-03 00:00:00.000000000 Z
11
+ date: 2023-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: psych
@@ -33,7 +33,7 @@ files:
33
33
  - lib/active_yaml.rb
34
34
  - lib/active_yaml/class_methods.rb
35
35
  - lib/active_yaml/factory_hash.rb
36
- - lib/active_yaml/method_mapper.rb
36
+ - lib/active_yaml/method_mapping.rb
37
37
  - lib/active_yaml/parser.rb
38
38
  - lib/active_yaml/version.rb
39
39
  - lib/active_yaml/yaml_hash.rb