Class: ObsidianFetch::Vault

Inherits:
Object
  • Object
show all
Defined in:
lib/obsidian_fetch/vault.rb

Overview

Vaultスナップショットを表現するイミュータブルなデータ構造

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(vault_pathes, notes:, links_by_file_path:, links_by_file_name:) ⇒ Vault

Returns a new instance of Vault.

Parameters:

  • vault_pathes (Array<String>)

    保管庫パスのリスト

  • notes (Hash{String => Array<String>})

    → [ファイルパス]

  • links_by_file_path (Hash{String => Array<String>})

    → [逆引きパス]

  • links_by_file_name (Hash{String => Array<String>})

    → [逆引きパス]



15
16
17
18
19
20
# File 'lib/obsidian_fetch/vault.rb', line 15

def initialize(vault_pathes, notes:, links_by_file_path:, links_by_file_name:)
  @vault_pathes = vault_pathes
  @notes = notes
  @links_by_file_path = links_by_file_path
  @links_by_file_name = links_by_file_name
end

Instance Attribute Details

Returns the value of attribute links_by_file_name.



9
10
11
# File 'lib/obsidian_fetch/vault.rb', line 9

def links_by_file_name
  @links_by_file_name
end

Returns the value of attribute links_by_file_path.



8
9
10
# File 'lib/obsidian_fetch/vault.rb', line 8

def links_by_file_path
  @links_by_file_path
end

#notesObject (readonly)

Returns the value of attribute notes.



7
8
9
# File 'lib/obsidian_fetch/vault.rb', line 7

def notes
  @notes
end

#vault_pathesObject (readonly)

Returns the value of attribute vault_pathes.



6
7
8
# File 'lib/obsidian_fetch/vault.rb', line 6

def vault_pathes
  @vault_pathes
end