Class: BigResources::FileInfoModel
- Inherits:
-
Object
- Object
- BigResources::FileInfoModel
- Defined in:
- lib/big_resources/model/file_model.rb
Instance Attribute Summary collapse
-
#file_name ⇒ Object
Returns the value of attribute file_name.
-
#file_path ⇒ Object
Returns the value of attribute file_path.
-
#total_count ⇒ Object
Returns the value of attribute total_count.
Instance Method Summary collapse
- #add_file_path(file_path) ⇒ Object
-
#initialize(file_name) ⇒ FileInfoModel
constructor
A new instance of FileInfoModel.
Constructor Details
#initialize(file_name) ⇒ FileInfoModel
Returns a new instance of FileInfoModel.
5 6 7 8 9 |
# File 'lib/big_resources/model/file_model.rb', line 5 def initialize(file_name) @file_path = [] @total_count = 0 @file_name = file_name end |
Instance Attribute Details
#file_name ⇒ Object
Returns the value of attribute file_name.
4 5 6 |
# File 'lib/big_resources/model/file_model.rb', line 4 def file_name @file_name end |
#file_path ⇒ Object
Returns the value of attribute file_path.
4 5 6 |
# File 'lib/big_resources/model/file_model.rb', line 4 def file_path @file_path end |
#total_count ⇒ Object
Returns the value of attribute total_count.
4 5 6 |
# File 'lib/big_resources/model/file_model.rb', line 4 def total_count @total_count end |
Instance Method Details
#add_file_path(file_path) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/big_resources/model/file_model.rb', line 11 def add_file_path(file_path) if file_path.length > 0 @file_path << file_path @total_count += 1 end end |