Class: Gridify::GridColumn

Inherits:
Object
  • Object
show all
Defined in:
lib/gridify/grid_column.rb

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ GridColumn

initial hide state (false)



35
36
37
# File 'lib/gridify/grid_column.rb', line 35

def initialize(options)
  update options
end

Instance Method Details

#fixed_widthObject



60
61
62
63
64
65
66
67
68
# File 'lib/gridify/grid_column.rb', line 60

def fixed_width
  if @fixed_width==false
    false
  elsif @fixed_width.nil?
    !resizable
  else
    @fixed_width
  end
end

#propertiesObject



47
48
49
# File 'lib/gridify/grid_column.rb', line 47

def properties
  jqgrid_properties
end

#resizableObject



51
52
53
54
55
56
57
58
# File 'lib/gridify/grid_column.rb', line 51

def resizable
  if @resizable==false
    false
  else
    # true or nil
    true
  end
end

#to_jsonObject



43
44
45
# File 'lib/gridify/grid_column.rb', line 43

def to_json
  properties.to_json #_with_js
end

#update(options) ⇒ Object



39
40
41
# File 'lib/gridify/grid_column.rb', line 39

def update(options)
  options.each {|atr, val| send( "#{atr}=", val )}
end