hatchery 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/hatchery.rb +4 -3
- metadata +5 -5
data/lib/hatchery.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# This code is COPYRIGHTED (C) 2012 Tom Corelis and contributor(s)
|
2
2
|
# SEE LICENSE.txt for the license agreement
|
3
3
|
|
4
4
|
module Hatchery
|
@@ -7,6 +7,7 @@ module Hatchery
|
|
7
7
|
# Declare this in the class you want to use
|
8
8
|
# Accepts an array of parameters of the types Symbol or Hash:
|
9
9
|
# spawn_with :name, :xp => { hash of options }, :money, :color => { hash of options... }
|
10
|
+
# NOTE: options code is tentative. do not use options yet...
|
10
11
|
def hatch_with(*params)
|
11
12
|
|
12
13
|
@params = []
|
@@ -36,7 +37,7 @@ module Hatchery
|
|
36
37
|
|
37
38
|
end
|
38
39
|
|
39
|
-
# Run me or hatch() in an IRB prompt!
|
40
|
+
# Run me or hatch!() in an IRB prompt!
|
40
41
|
def new_interactive!()
|
41
42
|
|
42
43
|
unless @params || !@params.empty?
|
@@ -93,7 +94,7 @@ module Hatchery
|
|
93
94
|
return false
|
94
95
|
end
|
95
96
|
|
96
|
-
elsif @
|
97
|
+
elsif @keys.include?(y.to_sym)
|
97
98
|
zerg[y.to_sym] = prompt_for_value(y)
|
98
99
|
else
|
99
100
|
puts "I don't understand that input. Try again!"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hatchery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-05-03 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: awesome_print
|
16
|
-
requirement: &
|
16
|
+
requirement: &2157195280 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2157195280
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: activemodel
|
27
|
-
requirement: &
|
27
|
+
requirement: &2157186480 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2157186480
|
36
36
|
description: A tool for quick, interactive creation of ActiveModel objects via IRB
|
37
37
|
email: tom@tomcorelis.com
|
38
38
|
executables: []
|