Class: Coopy::CompareFlags

Inherits:
Object
  • Object
show all
Defined in:
lib/lib/coopy/compare_flags.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCompareFlags

Returns a new instance of CompareFlags.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/lib/coopy/compare_flags.rb', line 7

def initialize
  @ordered = true
  @show_unchanged = false
  @unchanged_context = 1
  @always_show_order = false
  @never_show_order = true
  @show_unchanged_columns = false
  @unchanged_column_context = 1
  @always_show_header = true
  @acts = nil
end

Instance Attribute Details

#actsObject

Returns the value of attribute acts.



27
28
29
# File 'lib/lib/coopy/compare_flags.rb', line 27

def acts
  @acts
end

#always_show_headerObject

Returns the value of attribute always_show_header.



26
27
28
# File 'lib/lib/coopy/compare_flags.rb', line 26

def always_show_header
  @always_show_header
end

#always_show_orderObject

Returns the value of attribute always_show_order.



22
23
24
# File 'lib/lib/coopy/compare_flags.rb', line 22

def always_show_order
  @always_show_order
end

#never_show_orderObject

Returns the value of attribute never_show_order.



23
24
25
# File 'lib/lib/coopy/compare_flags.rb', line 23

def never_show_order
  @never_show_order
end

#orderedObject

Returns the value of attribute ordered.



19
20
21
# File 'lib/lib/coopy/compare_flags.rb', line 19

def ordered
  @ordered
end

#show_unchangedObject

Returns the value of attribute show_unchanged.



20
21
22
# File 'lib/lib/coopy/compare_flags.rb', line 20

def show_unchanged
  @show_unchanged
end

#show_unchanged_columnsObject

Returns the value of attribute show_unchanged_columns.



24
25
26
# File 'lib/lib/coopy/compare_flags.rb', line 24

def show_unchanged_columns
  @show_unchanged_columns
end

#unchanged_column_contextObject

Returns the value of attribute unchanged_column_context.



25
26
27
# File 'lib/lib/coopy/compare_flags.rb', line 25

def unchanged_column_context
  @unchanged_column_context
end

#unchanged_contextObject

Returns the value of attribute unchanged_context.



21
22
23
# File 'lib/lib/coopy/compare_flags.rb', line 21

def unchanged_context
  @unchanged_context
end

Instance Method Details

#allow_deleteObject



39
40
41
42
# File 'lib/lib/coopy/compare_flags.rb', line 39

def allow_delete 
  return true if @acts == nil
  return @acts.include?("delete")
end

#allow_insertObject



34
35
36
37
# File 'lib/lib/coopy/compare_flags.rb', line 34

def allow_insert 
  return true if @acts == nil
  return @acts.include?("insert")
end

#allow_updateObject



29
30
31
32
# File 'lib/lib/coopy/compare_flags.rb', line 29

def allow_update 
  return true if @acts == nil
  return @acts.include?("update")
end