Class: Milkode::Updater::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/milkode/database/updater.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeResult

Returns a new instance of Result.



105
106
107
108
109
# File 'lib/milkode/database/updater.rb', line 105

def initialize
  @file_count = 0
  @add_count = 0
  @update_count = 0
end

Instance Attribute Details

#add_countObject (readonly)

Returns the value of attribute add_count.



102
103
104
# File 'lib/milkode/database/updater.rb', line 102

def add_count
  @add_count
end

#file_countObject (readonly)

Returns the value of attribute file_count.



101
102
103
# File 'lib/milkode/database/updater.rb', line 101

def file_count
  @file_count
end

#update_countObject (readonly)

Returns the value of attribute update_count.



103
104
105
# File 'lib/milkode/database/updater.rb', line 103

def update_count
  @update_count
end

Instance Method Details

#exist_update?Boolean

Returns:

  • (Boolean)


123
124
125
# File 'lib/milkode/database/updater.rb', line 123

def exist_update?
  @add_count > 0 || @update_count > 0
end

#inc_add_countObject



115
116
117
# File 'lib/milkode/database/updater.rb', line 115

def inc_add_count
  @add_count += 1
end

#inc_file_countObject



111
112
113
# File 'lib/milkode/database/updater.rb', line 111

def inc_file_count
  @file_count += 1
end

#inc_update_countObject



119
120
121
# File 'lib/milkode/database/updater.rb', line 119

def inc_update_count
  @update_count += 1
end