axr 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c51859d7fd901aa0da185f5fa5a176bc6d6e177bbaa1a8f3d7e10f5aa65f1e7
4
- data.tar.gz: 67e05aea13a6d3ac1399212f09c3b7768a5c76affc4d397a382a9fd43f4ba9c9
3
+ metadata.gz: 07cc36c3d0e6ff1efe1a1519a68cf8c9dacdf0ac8f61c73fdda1e69da7fc179c
4
+ data.tar.gz: aaca58deb866a1709cba78aeac7f264e3faa15476cefb1e24f761419aba15381
5
5
  SHA512:
6
- metadata.gz: 7de34cef752456c2cc603f70ba36ddc4088ac1cb89c0dcf2b2231c73e7112042b7b2a7db201cd99d037a42f0e467649daffe8dca0556cf7d7cdddf16da44057b
7
- data.tar.gz: 27e72299bb4860cda3d92285a62b1f2e9efd9502f03619b4b3eb454b0c6f1691c5ab8718f98e3441c3ff74ad4267e1526b1175b1dcbae8eab868b026ad1109ef
6
+ metadata.gz: 76674bdd4990df3982fb13c4061e5494e55578bf2c612f1d27c6f0b04206adc1dc9e6879b3bb405155b989fa2b44d002f8b004f995cae1064e25d9b9236e5b63
7
+ data.tar.gz: 1473e443635bd793f7a7dfc9e261493d8076d0cbfad011e128ba0caf9ba622c20d1e2d07dd5e5f3d63bb7578fce564b5e7c55efc14312ff84637d5b00024505f
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- axr (0.5.0)
4
+ axr (0.6.0)
5
5
  colorize (~> 0.8.1)
6
6
  thor (~> 0.20)
7
7
 
@@ -10,20 +10,21 @@ module AxR
10
10
 
11
11
  LayerConflictError = Class.new(StandardError)
12
12
 
13
- attr_reader :layers
13
+ attr_reader :layers, :default_options
14
14
 
15
15
  def initialize
16
16
  @layers = []
17
17
  end
18
18
 
19
- def define(&block)
19
+ def define(default_options = {}, &block)
20
+ @default_options = default_options
20
21
  instance_eval(&block)
21
22
  end
22
23
 
23
24
  def layer(layer_name, options = {})
24
25
  check_name_conflict!(layer_name)
25
26
 
26
- layers << AxR::Layer.new(layer_name, layers.size, options)
27
+ layers << AxR::Layer.new(layer_name, layers.size, default_options.merge(options))
27
28
  end
28
29
 
29
30
  def layer_names
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AxR
4
- VERSION = '0.5.0'
4
+ VERSION = '0.6.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: axr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Volodya Sveredyuk
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-28 00:00:00.000000000 Z
11
+ date: 2019-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize