porolog 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -96,10 +96,11 @@ module Porolog
96
96
  end
97
97
 
98
98
  # Add a Rule to the Predicate.
99
- # @param rule [Object] the name (or otherwise object) used to register a scope.
100
- # @return [Array<Porolog::Rule>] the Predicate's rule.
99
+ # @param rule [Object] a rule to add to the Predicate.
100
+ # @return [Porolog::Predicate] the Predicate.
101
101
  def <<(rule)
102
102
  @rules << rule
103
+ self
103
104
  end
104
105
 
105
106
  # A pretty print String of the Predicate.
data/lib/porolog/scope.rb CHANGED
@@ -23,7 +23,7 @@ module Porolog
23
23
  attr_reader :name
24
24
 
25
25
  # Creates a new Scope unless it already exists.
26
- # @param name [Object] the name (or otherwise object) used to register a scope.
26
+ # @param name [Symbol, Object] the name (or otherwise object) used to register a scope.
27
27
  # @return [Porolog::Scope] new or existing Scope.
28
28
  def self.new(name)
29
29
  @@scopes[name] || super
@@ -55,7 +55,8 @@ module Porolog
55
55
  end
56
56
 
57
57
  # Returns the names of all registered Scopes.
58
- # @return [Array<Symbol>,Array<Object>] the names.
58
+ # @return [Array<Symbol>] the names if scopes are named as Symbols (the intended case).
59
+ # @return [Array<Object>] the names if the names are not actually Symbols.
59
60
  def self.scopes
60
61
  @@scopes.keys
61
62
  end
data/lib/porolog.rb CHANGED
@@ -8,7 +8,7 @@
8
8
  module Porolog
9
9
 
10
10
  # The most recent version of the Porolog gem.
11
- VERSION = '0.0.3'
11
+ VERSION = '0.0.4'
12
12
  # The most recent date of when the VERSION changed.
13
13
  VERSION_DATE = '2019-04-21'
14
14
 
@@ -16,7 +16,8 @@ module Porolog
16
16
  # that returns an Arguments based on the arguments provided to
17
17
  # the method.
18
18
  # @param names [Array<#to_sym>] names of the Predicates to create.
19
- # @return [Porolog::Predicate|Array<Porolog::Predicate>] Predicate or Predicates created
19
+ # @return [Porolog::Predicate] Predicate created if only one name is provided
20
+ # @return [Array<Porolog::Predicate>] Predicates created if multiple names are provided
20
21
  def predicate(*names)
21
22
  names = [names].flatten
22
23
 
@@ -39,3 +40,4 @@ end
39
40
  require_relative 'porolog/error'
40
41
  require_relative 'porolog/scope'
41
42
  require_relative 'porolog/predicate'
43
+ require_relative 'porolog/arguments'