Class: ContextIO::SourceSyncData

Inherits:
Object
  • Object
show all
Defined in:
lib/contextio/source_sync_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source_label, folder_hash = nil) ⇒ SourceSyncData

Returns a new instance of SourceSyncData.



7
8
9
10
11
12
13
14
15
# File 'lib/contextio/source_sync_data.rb', line 7

def initialize(source_label, folder_hash = nil)
  @folder_hash = folder_hash
  @source_label = source_label
  @folder_names = (folder_hash || {}).keys

  @folders = (folder_hash || {}).collect do |folder_name, attr_hash|
    ContextIO::FolderSyncData.new(folder_name, attr_hash)
  end
end

Instance Attribute Details

#folder_namesObject (readonly)

Returns the value of attribute folder_names.



5
6
7
# File 'lib/contextio/source_sync_data.rb', line 5

def folder_names
  @folder_names
end

#foldersObject (readonly)

Returns the value of attribute folders.



5
6
7
# File 'lib/contextio/source_sync_data.rb', line 5

def folders
  @folders
end

#source_labelObject (readonly)

Returns the value of attribute source_label.



5
6
7
# File 'lib/contextio/source_sync_data.rb', line 5

def source_label
  @source_label
end