named-parameters 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +16 -0
- data/RELEASENOTES +4 -0
- data/VERSION +1 -1
- data/lib/named-parameters/module.rb +1 -1
- data/named-parameters.gemspec +1 -1
- metadata +3 -3
data/README.md
CHANGED
@@ -66,6 +66,22 @@ a parameter named `timeout` - so the following invocations will not raise error:
|
|
66
66
|
But specifying an unrecognized parameter will do:
|
67
67
|
|
68
68
|
gs.request '/some/path', :ssl => true # ArgumentError, GoogleStorage#request unrecognized parameter: ssl
|
69
|
+
|
70
|
+
The `has_named_parameters` declaration may be used for either class or
|
71
|
+
instance methods of a class:
|
72
|
+
|
73
|
+
class Point
|
74
|
+
has_named_parameters :initialize, :required => [ :x, :y ], :optional => :color
|
75
|
+
def initialize opts = { }
|
76
|
+
# ...
|
77
|
+
end
|
78
|
+
|
79
|
+
has_named_parameters :load, :optional => :translations
|
80
|
+
def self.load filename, opts => { }
|
81
|
+
# ...
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
69
85
|
|
70
86
|
Optional and Required Parameters
|
71
87
|
--------------------------------
|
data/RELEASENOTES
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
data/named-parameters.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: named-parameters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Juris Galang
|