Module: RGhost::Grid::FieldFormat
- Extended by:
- RubyToPs
- Defined in:
- lib/rghost/grid/field_format.rb
Defined Under Namespace
Classes: Custom
Class Method Summary collapse
-
.eurodate(value) ⇒ Object
Format Time/Date to %d/%m/%Y.
-
.no_space(value) ⇒ Object
Cut all blank spaces.
- .string(value) ⇒ Object
Methods included from RubyToPs
array_to_stack, hash_to_array, pack_string, ps_escape, string_eval, to_array, to_bool, to_string, to_string_array
Class Method Details
.eurodate(value) ⇒ Object
Format Time/Date to %d/%m/%Y
11 12 13 14 |
# File 'lib/rghost/grid/field_format.rb', line 11 def self.eurodate(value) string(value.strftime("%d/%m/%Y")) end |
.no_space(value) ⇒ Object
Cut all blank spaces
16 17 18 |
# File 'lib/rghost/grid/field_format.rb', line 16 def self.no_space(value) string(value.to_s.gsub(/\s/,'')) end |
.string(value) ⇒ Object
20 21 22 |
# File 'lib/rghost/grid/field_format.rb', line 20 def self.string(value) to_string(value) end |