named_parameters 0.1.3 → 0.1.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.
- data/README +1 -0
- data/lib/named_parameters.rb +5 -4
- metadata +3 -3
data/README
CHANGED
@@ -94,6 +94,7 @@ Kudos to Juris Galang and his gem named-parameters. (http://www.rubygems.org/gem
|
|
94
94
|
Defenitely have a look at this gem also, if you want to use named parameters.
|
95
95
|
|
96
96
|
== Changelog
|
97
|
+
[0.1.4] * Changed visibility in documentation
|
97
98
|
[0.1.3] * Made LICENSE visible to documentation (Sorry for that)
|
98
99
|
* Made actual name space and NamedParameters#named_parameters macro visible to documentation
|
99
100
|
[0.1.2] * Changed headings in documentation
|
data/lib/named_parameters.rb
CHANGED
@@ -8,9 +8,9 @@ module Kernel #:nodoc:
|
|
8
8
|
end
|
9
9
|
|
10
10
|
#
|
11
|
-
# Include this module to enable the named_parameters macro
|
11
|
+
# Include this module to enable the NamedParameters#named_parameters macro
|
12
12
|
#
|
13
|
-
module NamedParameters
|
13
|
+
module NamedParameters # :nodoc: all
|
14
14
|
|
15
15
|
|
16
16
|
# Makes all methods of this module to class or module methods of include
|
@@ -19,7 +19,7 @@ module NamedParameters
|
|
19
19
|
end
|
20
20
|
|
21
21
|
#noinspection RubyArgCount
|
22
|
-
self.class.class_eval do
|
22
|
+
self.class.class_eval do # :nodoc:
|
23
23
|
alias :method_added_before_named_parameters :method_added #:nodoc:
|
24
24
|
private :method_added_before_named_parameters
|
25
25
|
end
|
@@ -27,12 +27,13 @@ module NamedParameters
|
|
27
27
|
|
28
28
|
# @param defaults [Hash] Containing defaults values for optional parameters.
|
29
29
|
# Parameters that are not listet here are mandatory.
|
30
|
-
def named_parameters (defaults = { })
|
30
|
+
def named_parameters (defaults = { }) #:doc:
|
31
31
|
defaults.empty? ? all_required : some_defaults(defaults)
|
32
32
|
end
|
33
33
|
|
34
34
|
private
|
35
35
|
|
36
|
+
# :nodoc:
|
36
37
|
# [Symbol] is in [:nothing, :all_required, :defaults]
|
37
38
|
@@next_method_modifier = :nothing
|
38
39
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: named_parameters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-04-16 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &25932288 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
version: 3.0.0
|
25
25
|
type: :development
|
26
26
|
prerelease: false
|
27
|
-
version_requirements: *
|
27
|
+
version_requirements: *25932288
|
28
28
|
description: ! 'By including the NamedParameters module into your class/module the
|
29
29
|
''named_parameters'' macro is
|
30
30
|
|