Class: Milkode::Updater::Result
- Inherits:
-
Object
- Object
- Milkode::Updater::Result
- Defined in:
- lib/milkode/database/updater.rb
Instance Attribute Summary collapse
-
#add_count ⇒ Object
readonly
Returns the value of attribute add_count.
-
#file_count ⇒ Object
readonly
Returns the value of attribute file_count.
-
#update_count ⇒ Object
readonly
Returns the value of attribute update_count.
Instance Method Summary collapse
- #exist_update? ⇒ Boolean
- #inc_add_count ⇒ Object
- #inc_file_count ⇒ Object
- #inc_update_count ⇒ Object
-
#initialize ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize ⇒ Result
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_count ⇒ Object (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_count ⇒ Object (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_count ⇒ Object (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
123 124 125 |
# File 'lib/milkode/database/updater.rb', line 123 def exist_update? @add_count > 0 || @update_count > 0 end |
#inc_add_count ⇒ Object
115 116 117 |
# File 'lib/milkode/database/updater.rb', line 115 def inc_add_count @add_count += 1 end |
#inc_file_count ⇒ Object
111 112 113 |
# File 'lib/milkode/database/updater.rb', line 111 def inc_file_count @file_count += 1 end |
#inc_update_count ⇒ Object
119 120 121 |
# File 'lib/milkode/database/updater.rb', line 119 def inc_update_count @update_count += 1 end |