Class: Ace::Support::Items::Models::ScanResult

Inherits:
Struct
  • Object
show all
Defined in:
lib/ace/support/items/models/scan_result.rb

Overview

Value object representing a scan result for an item directory Holds path information, raw ID, and folder metadata

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dir_pathObject

Returns the value of attribute dir_path

Returns:

  • (Object)

    the current value of dir_path



9
10
11
# File 'lib/ace/support/items/models/scan_result.rb', line 9

def dir_path
  @dir_path
end

#file_pathObject

Returns the value of attribute file_path

Returns:

  • (Object)

    the current value of file_path



9
10
11
# File 'lib/ace/support/items/models/scan_result.rb', line 9

def file_path
  @file_path
end

#folder_nameObject

Returns the value of attribute folder_name

Returns:

  • (Object)

    the current value of folder_name



9
10
11
# File 'lib/ace/support/items/models/scan_result.rb', line 9

def folder_name
  @folder_name
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



9
10
11
# File 'lib/ace/support/items/models/scan_result.rb', line 9

def id
  @id
end

#slugObject

Returns the value of attribute slug

Returns:

  • (Object)

    the current value of slug



9
10
11
# File 'lib/ace/support/items/models/scan_result.rb', line 9

def slug
  @slug
end

#special_folderObject

Returns the value of attribute special_folder

Returns:

  • (Object)

    the current value of special_folder



9
10
11
# File 'lib/ace/support/items/models/scan_result.rb', line 9

def special_folder
  @special_folder
end

Instance Method Details

#to_hObject



18
19
20
21
22
23
24
25
26
27
# File 'lib/ace/support/items/models/scan_result.rb', line 18

def to_h
  {
    id: id,
    slug: slug,
    folder_name: folder_name,
    dir_path: dir_path,
    file_path: file_path,
    special_folder: special_folder
  }
end