supa 0.2.2 → 0.2.3

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
  SHA1:
3
- metadata.gz: 92012b69325c3c63ab3e8126872df4fa91452788
4
- data.tar.gz: b39d82fc06b14aa5bb03c84a2da9f11706ec21d7
3
+ metadata.gz: e6b7efd9667abba76f2e38690529fc1d48d65785
4
+ data.tar.gz: 9deff2741c116d12ca1f7eb064043bfe3ca5e9f8
5
5
  SHA512:
6
- metadata.gz: f224f5c7d0893dd5f0ff17a3c661be0e6a2dd744a01adc93f6a92232739123b6082a50ce67fa676d86e7d61752e235211c56517d3d059e39bcc5867aec60ce9c
7
- data.tar.gz: 681012f92af81567b104b300a5c3232ad55440cf7f9dec702b24b3e40761336ac75bc0cc10aff98d0c2d5fcdc94c325310b7f26f710eab9d8e9ba814a2c9f916
6
+ metadata.gz: d5454644b39f98f31051e061922a3df2b68c1fe01c531dbf109dc48436054d5769af063f2b7efb9ce94cb0727bc814bf246b204adc9a3f2a58eec8b008ab6fad
7
+ data.tar.gz: 072f2b3885875c593637df845b4b9499580cf339f2064f1db781de673bfd18aa10e0a6311b5de8001ea618556901250ff612445ad3c9beb278c1aeeebe5e9e0e
data/lib/supa/builder.rb CHANGED
@@ -12,12 +12,11 @@ module Supa
12
12
  COMMANDS.each do |command|
13
13
  klass = Supa::Commands.const_get(command.capitalize)
14
14
 
15
- define_method command do |name, getter = nil, options = {}, &block|
15
+ define_method command do |name, options = {}, &block|
16
16
  klass.new(representer: representer,
17
17
  context: context,
18
18
  tree: tree,
19
19
  name: name,
20
- getter: getter,
21
20
  options: options,
22
21
  &block).represent
23
22
  end
data/lib/supa/command.rb CHANGED
@@ -1,11 +1,10 @@
1
1
  module Supa
2
2
  class Command
3
- def initialize(representer:, context:, tree:, name:, getter:, options: {}, &block)
3
+ def initialize(representer:, context:, tree:, name:, options: {}, &block)
4
4
  @representer = representer
5
5
  @context = context
6
6
  @tree = tree
7
7
  @name = name
8
- @getter = getter
9
8
  @options = options
10
9
  @block = block
11
10
  end
@@ -58,7 +57,7 @@ module Supa
58
57
  end
59
58
 
60
59
  def getter
61
- @getter || @name
60
+ options[:getter] || @name
62
61
  end
63
62
  end
64
63
  end
data/lib/supa/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Supa
2
- VERSION = '0.2.2'
2
+ VERSION = '0.2.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: supa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Das
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-12 00:00:00.000000000 Z
11
+ date: 2017-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler