class Dropdown::Readers::DropboxReader
Public Instance Methods
find_html_files(path)
click to toggle source
# File lib/dropdown/readers/dropbox_reader.rb, line 11 def find_html_files(path) files = [] contents = client.metadata(path)['contents'] contents.each do |child| unless child['is_dir'] path = child['path'] if Dropdown::HTML_EXTENSIONS.include? File.extname(path) files << path end end end files end
read(path)
click to toggle source
# File lib/dropdown/readers/dropbox_reader.rb, line 7 def read(path) client.get_file(path) end
Private Instance Methods
client()
click to toggle source
# File lib/dropdown/readers/dropbox_reader.rb, line 27 def client @client ||= DropboxClient.new(Dropdown.configuration.dropbox_access_token) end