pixii 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/pixii.rb +8 -2
- metadata +1 -1
data/lib/pixii.rb
CHANGED
@@ -23,14 +23,20 @@ class Pixii
|
|
23
23
|
attr_reader :opts
|
24
24
|
attr_accessor :name, :steps
|
25
25
|
|
26
|
-
def self.
|
26
|
+
def self.defaults
|
27
|
+
@@defaults ||= {:project => ARGV.first, :templates => '../templates'}
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.defaults=(hsh); @@defaults = hsh; end
|
31
|
+
|
32
|
+
def self.called(name, options={})
|
27
33
|
g = new(name, options)
|
28
34
|
g.normalize_opts!
|
29
35
|
yield g, g.opts
|
30
36
|
end
|
31
37
|
|
32
38
|
def initialize(name, options)
|
33
|
-
self.name, self.opts, self.steps = name, options, []
|
39
|
+
self.name, self.opts, self.steps = name, self.class.defaults.merge(options), []
|
34
40
|
end
|
35
41
|
|
36
42
|
def opts=(options)
|