Class: RGhost::Grid::FieldFormat::Custom

Inherits:
Object
  • Object
show all
Defined in:
lib/rghost/grid/field_format.rb

Overview

Prototype to override format method.

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Custom

Returns a new instance of Custom.



29
30
31
# File 'lib/rghost/grid/field_format.rb', line 29

def initialize(value)
  @value=value
end

Instance Method Details

#formatObject



37
38
39
# File 'lib/rghost/grid/field_format.rb', line 37

def format
  @value.to_s
end

#gs_formatObject



33
34
35
# File 'lib/rghost/grid/field_format.rb', line 33

def gs_format
  RGhost::Grid::FieldFormat.string(self.format)
end