forked from whomwah/rqrcode
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request whomwah#5 from metaskills/core_ext
Proper namespace CoreExtensions and only extend when needed.
- Loading branch information
Showing
4 changed files
with
18 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
require 'rqrcode/core_ext/array/behavior' | ||
|
||
class Array #:nodoc: | ||
include CoreExtensions::Array::Behavior | ||
include RQRCode::CoreExtensions::Array::Behavior | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
module CoreExtensions #:nodoc: | ||
module Array #:nodoc: | ||
module Behavior | ||
def extract_options! | ||
last.is_a?(::Hash) ? pop : {} | ||
module RQRCode | ||
module CoreExtensions #:nodoc: | ||
module Array #:nodoc: | ||
module Behavior | ||
def extract_options! | ||
last.is_a?(::Hash) ? pop : {} | ||
end unless [].respond_to?(:extract_options!) | ||
end | ||
end | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
require 'rqrcode/core_ext/integer/bitwise' | ||
|
||
class Integer #:nodoc: | ||
include CoreExtensions::Integer::Bitwise | ||
include RQRCode::CoreExtensions::Integer::Bitwise | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters