wedge 0.1.62 → 0.1.63

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: adaaf3ee60806692e368341ef45da7729b50d8a4
4
- data.tar.gz: c4c323f0e0fb5080bbaa62671c6e4483f11596d5
3
+ metadata.gz: 39b7c08fa1dbe213d74ca26c1c74472a0499c5d5
4
+ data.tar.gz: 81c675b88aae66be1cf815a7257e83f29bcd0f35
5
5
  SHA512:
6
- metadata.gz: a79d5039c3d11deccd285f13e093192a1a85a31639c85cfee554e7b4eeb8789eee759c4144d5fb3e226e6168bc263e1327528f05a8957e3f3251398ccc89ac94
7
- data.tar.gz: 0e9597a27d5a60c75db692af969c34589629ed7c529d793f2c7aa5e6337259df0d53807070d96150d209cb4a1187d5c3554d4f4963aae421eb00c54926d0742e
6
+ metadata.gz: d2a1cd5f87a251389b56a3a1947ae9b48432c27048a9d1d9976fee9837312a526097a68cc4a209e475a63041a92ffa47c61a6294572c823818020f170c578593
7
+ data.tar.gz: d6920bae03919ace7fa0951db22354c416f10d444ef57f086256dbc09397791356e46cf2fdd5892eb63fb3ccdb9a9d3b4f392332b500da241258f29c3ceb1aa9
@@ -18,7 +18,7 @@ class Wedge
18
18
  # Declares that the owner can perform `verb` on `class`.
19
19
  def can(verb, klass=nil, columns=[], &block)
20
20
  columns = [columns] unless columns.is_a? Array
21
- rules << [true, verb, get_class(klass), columns, block]
21
+ rules << [true, verb, get_class_name(klass), columns, block]
22
22
  end
23
23
 
24
24
  # Inverse of `can`.
@@ -70,8 +70,12 @@ class Wedge
70
70
 
71
71
  private
72
72
 
73
+ def get_class_name(klass)
74
+ [NilClass, Symbol].include?(klass.class) ? klass : klass.name
75
+ end
76
+
73
77
  def get_class(object)
74
- [NilClass, Symbol, Class].include?(object.class) ? object : object.class
78
+ object.class.method_defined?(:original_class_name) ? object.class.original_class_name : object.class.name
75
79
  end
76
80
  end
77
81
 
data/lib/wedge/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Wedge
2
- VERSION = '0.1.62'
2
+ VERSION = '0.1.63'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wedge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.62
4
+ version: 0.1.63
5
5
  platform: ruby
6
6
  authors:
7
7
  - cj
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-01 00:00:00.000000000 Z
11
+ date: 2015-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal-wedge
@@ -264,7 +264,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
264
264
  version: '0'
265
265
  requirements: []
266
266
  rubyforge_project:
267
- rubygems_version: 2.2.2
267
+ rubygems_version: 2.4.5.1
268
268
  signing_key:
269
269
  specification_version: 4
270
270
  summary: Components for the Browser and Server