Class: Sprout::SWFMillInputResolver

Inherits:
SimpleResolver
  • Object
show all
Defined in:
lib/sprout/tasks/swfmill_input_task.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#get_symbol_id(file) ⇒ Object



120
121
122
123
124
125
126
127
128
129
# File 'lib/sprout/tasks/swfmill_input_task.rb', line 120

def get_symbol_id(file)
  trimmed = file.gsub(@base_dir, '')
  parts = trimmed.split('.')
  parts.pop
  trimmed = parts.join('.')

  result = trimmed.split(File::SEPARATOR).join('.')
  result = result.gsub(/^./, '')
  return result
end

#ignore_file?(file) ⇒ Boolean

Returns:

  • (Boolean)


111
112
113
114
115
116
117
118
# File 'lib/sprout/tasks/swfmill_input_task.rb', line 111

def ignore_file?(file)
  base = File.basename(file)
  if(base == '.DS_Store' || base == 'Thumbs.db' || base.match(/^\d/) || base == '.svn')
    @ignored_files << file
    return true
  end
  return false
end