forked from threedaymonk/text
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of git@github.com:threedaymonk/text
- Loading branch information
Showing
11 changed files
with
1,294 additions
and
1,250 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
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,7 +1,30 @@ | ||
require 'text/double_metaphone' | ||
require 'text/figlet' | ||
require 'text/levenshtein' | ||
require 'text/metaphone' | ||
require 'text/porter_stemming' | ||
require 'text/soundex' | ||
require 'text/version' | ||
|
||
module Text | ||
def self.is_19? | ||
RUBY_VERSION[0, 3] == "1.9" | ||
end | ||
|
||
def self.encoding_of(string) | ||
if is_19? | ||
string.encoding.to_s | ||
else | ||
$KCODE | ||
end | ||
end | ||
|
||
def self.raise_19_incompat | ||
if is_19? | ||
raise "Text::Figlet is not compatible with Ruby 1.9 at this time" | ||
end | ||
end | ||
end | ||
|
||
if !Text.is_19? | ||
require 'text/figlet' | ||
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
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
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ module Figlet | |
class Smusher | ||
|
||
def initialize(font) | ||
Text.raise_19_incompat | ||
@font = font | ||
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
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
Oops, something went wrong.