Module: Vangogh
- Defined in:
- lib/vangogh.rb,
lib/vangogh/number.rb,
lib/vangogh/version.rb
Defined Under Namespace
Classes: Number
Constant Summary collapse
- VERSION =
"0.1.0"
Class Method Summary collapse
Class Method Details
.abbreviate(value) ⇒ Object
11 12 13 |
# File 'lib/vangogh.rb', line 11 def abbreviate(value) Number.new(value).abbreviate end |
.abstract(value) ⇒ Object
7 8 9 |
# File 'lib/vangogh.rb', line 7 def abstract(value) Number.new(value).abstract end |
.numeric?(text) ⇒ Boolean
15 16 17 |
# File 'lib/vangogh.rb', line 15 def numeric?(text) !!(text.to_s.strip =~ /\A[\d\,.]+\z/) end |