Class: FilesMgr

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(moab_interface) ⇒ FilesMgr

Returns a new instance of FilesMgr.



126
127
128
# File 'lib/tinkit_base_node.rb', line 126

def initialize(moab_interface)
  @moab_interface = moab_interface
end

Instance Attribute Details

#moab_interfaceObject

Returns the value of attribute moab_interface.



124
125
126
# File 'lib/tinkit_base_node.rb', line 124

def moab_interface
  @moab_interface
end

Instance Method Details

#add_files(node, file_datas) ⇒ Object

TODO: Move common file management functions from base node to here TODO: fix naming inconsistencies



132
133
134
# File 'lib/tinkit_base_node.rb', line 132

def add_files(node, file_datas)
  @moab_interface.add(node, file_datas)
end

#add_raw_data(node, attach_name, content_type, raw_data, file_modified_at = nil) ⇒ Object



136
137
138
# File 'lib/tinkit_base_node.rb', line 136

def add_raw_data(node, attach_name, content_type, raw_data, file_modified_at = nil)
  @moab_interface.add_raw_data(node, attach_name, content_type, raw_data, file_modified_at = nil)
end

#get_attachments_metadata(node) ⇒ Object

todo change name to get_files_metadata



149
150
151
# File 'lib/tinkit_base_node.rb', line 149

def (node)
  @moab_interface.(node)
end

#get_raw_data(node, basename) ⇒ Object



144
145
146
# File 'lib/tinkit_base_node.rb', line 144

def get_raw_data(node, basename)
  @moab_interface.get_raw_data(node, basename)
end

#subtract_files(node, params) ⇒ Object



140
141
142
# File 'lib/tinkit_base_node.rb', line 140

def subtract_files(node, params)
  @moab_interface.subtract(node, params)
end