pixii 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/pixii.rb +8 -2
  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.called(name, options={:project => ARGV.first, :templates => '../templates'})
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pixii
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Lloyd