Class: BigResources::FileInfoModel

Inherits:
Object
  • Object
show all
Defined in:
lib/big_resources/model/file_model.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject

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_pathObject

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_countObject

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