Forked from bzerangue/convert-number-to-word.rb
Created
July 22, 2012 01:17
Revisions
-
bzerangue renamed this gist
Dec 6, 2011 . 1 changed file with 8 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -17,4 +17,11 @@ def convert_number_to_word(number) Sass::Script::String.new(number.value.en.numwords) end declare :convert_number_to_word, :args => [:Number] end ## To use in Compass, save this file in the same directory as the config.rb ## and add as a required library in your config.rb file. ## ## require 'convert-number-to-word' ## -
bzerangue revised this gist
Dec 6, 2011 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,7 @@ require 'sass' ## install Linguistics gem, sudo install gem linguistics require 'linguistics' Linguistics::use( :en ) # extends Array, String, and Numeric @@ -11,7 +14,7 @@ module Sass::Script::Functions def convert_number_to_word(number) assert_type number, :Number Sass::Script::String.new(number.value.en.numwords) end declare :convert_number_to_word, :args => [:Number] end -
bzerangue revised this gist
Dec 6, 2011 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ require 'sass' require 'linguistics' Linguistics::use( :en ) # extends Array, String, and Numeric ## this is the linguistics gem, ## instructions on how to use, http://deveiate.org/projects/Linguistics/wiki/English @@ -10,7 +11,7 @@ module Sass::Script::Functions def convert_number_to_word(number) assert_type number, :Number Sass::Script::String.new(convert_number_to_word.en.numwords) end declare :convert_number_to_word, :args => [:number] end -
bzerangue revised this gist
Dec 6, 2011 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -8,9 +8,9 @@ ## Sass Function module Sass::Script::Functions def convert_number_to_word(number) assert_type number, :Number Sass::Script::String.new(number.value.convert_number_to_word.en.numwords) end declare :convert_number_to_word, :args => [:number] end -
bzerangue revised this gist
Dec 6, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ module Sass::Script::Functions def convertNumberToWord(number) assert_type number, :Number Sass::Script::String.new(number.value.convertNumberToWord.en.numwords) end declare :convertNumberToWord, :args => [:number] end -
bzerangue revised this gist
Dec 6, 2011 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,11 @@ require 'sass' require 'linguistics' ## this is the linguistics gem, ## instructions on how to use, http://deveiate.org/projects/Linguistics/wiki/English ## 5.en.numwords would output 'five' ## Sass Function module Sass::Script::Functions def convertNumberToWord(number) -
bzerangue revised this gist
Dec 6, 2011 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,12 @@ require 'sass' ## this is the linguistics gem, ## instructions on how to use, http://deveiate.org/projects/Linguistics/wiki/English ## 5.en.numwords would output 'five' require 'linguistics' module Sass::Script::Functions def convertNumberToWord(number) assert_type number, :Number -
bzerangue created this gist
Dec 6, 2011 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ require 'sass' require 'linguistics' module Sass::Script::Functions def convertNumberToWord(number) assert_type number, :Number Sass::Script::Number.new(number.value.convertNumberToWord.en.numwords) end declare :convertNumberToWord, :args => [:number] end