spiceinit 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +8 -10
- data/lib/spiceinit/version.rb +1 -1
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -107,31 +107,29 @@ When you pass a <tt>proc</tt> as a value you must call the key method as a <tt>p
|
|
107
107
|
|
108
108
|
Another way of using <tt>inspice</tt> is with factory methods.
|
109
109
|
class Person
|
110
|
-
def self.new
|
111
|
-
inspice :name =>
|
110
|
+
def self.new(name=nil)
|
111
|
+
inspice :name => name
|
112
112
|
end
|
113
113
|
end
|
114
114
|
|
115
115
|
person = Person.new
|
116
116
|
p person
|
117
|
-
# => #<Person:
|
117
|
+
# => #<Person:0x1287034 @name=nil>
|
118
118
|
p person.name
|
119
|
-
# =>
|
119
|
+
# => nil
|
120
120
|
person.name = 'Lucky'
|
121
121
|
p person.name
|
122
122
|
# => "Lucky"
|
123
123
|
p person
|
124
|
-
# => #<Person:
|
125
|
-
person = Person.new
|
126
|
-
person.name = 'Tintin'
|
127
|
-
end
|
124
|
+
# => #<Person:0x1287034 @name="Lucky">
|
125
|
+
person = Person.new('Tintin')
|
128
126
|
p person
|
129
|
-
# => #<Person:
|
127
|
+
# => #<Person:0x1286e54 @name="Tintin">
|
130
128
|
p person.name
|
131
129
|
# => "Tintin"
|
132
130
|
person.name = 'Lucky'
|
133
131
|
p person
|
134
|
-
#<Person:
|
132
|
+
# => #<Person:0x1286e54 @name="Lucky">
|
135
133
|
p person.name
|
136
134
|
# => "Lucky"
|
137
135
|
|
data/lib/spiceinit/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spiceinit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Luciano Altube
|