spiceinit 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.rdoc +8 -10
  2. data/lib/spiceinit/version.rb +1 -1
  3. metadata +3 -3
@@ -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 => 'Tintin'
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:0xb374 @name="Tintin">
117
+ # => #<Person:0x1287034 @name=nil>
118
118
  p person.name
119
- # => "Tintin"
119
+ # => nil
120
120
  person.name = 'Lucky'
121
121
  p person.name
122
122
  # => "Lucky"
123
123
  p person
124
- # => #<Person:0xb374 @name="Lucky">
125
- person = Person.new do |c|
126
- person.name = 'Tintin'
127
- end
124
+ # => #<Person:0x1287034 @name="Lucky">
125
+ person = Person.new('Tintin')
128
126
  p person
129
- # => #<Person:0xb180 @name="Tintin">
127
+ # => #<Person:0x1286e54 @name="Tintin">
130
128
  p person.name
131
129
  # => "Tintin"
132
130
  person.name = 'Lucky'
133
131
  p person
134
- #<Person:0xb180 @name="Lucky">
132
+ # => #<Person:0x1286e54 @name="Lucky">
135
133
  p person.name
136
134
  # => "Lucky"
137
135
 
@@ -1,3 +1,3 @@
1
1
  module SpiceInit
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
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: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Luciano Altube