Skip to content

Commit

Permalink
Change Adamantium.included to be private
Browse files Browse the repository at this point in the history
* Refactor to use class_eval
  • Loading branch information
dkubb committed Nov 21, 2013
1 parent 13849b6 commit b25e8b7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 43 deletions.
2 changes: 1 addition & 1 deletion config/flay.yml
@@ -1,3 +1,3 @@
---
threshold: 7
total_score: 56
total_score: 53
7 changes: 5 additions & 2 deletions lib/adamantium.rb
Expand Up @@ -48,10 +48,13 @@ def self.included(descendant)
#
# @api private
def self.included(descendant)
descendant.extend ModuleMethods
descendant.extend ClassMethods if descendant.kind_of?(Class)
descendant.class_eval do
extend ModuleMethods
extend ClassMethods if kind_of?(Class)
end
self
end
private_class_method :included

# Freeze the object
#
Expand Down
40 changes: 0 additions & 40 deletions spec/unit/adamantium/class_methods/included_spec.rb

This file was deleted.

0 comments on commit b25e8b7

Please sign in to comment.