Class: SwitchFile::FileType

Inherits:
Valuable
  • Object
show all
Defined in:
lib/switch_file/file_type.rb

Overview

A type of file within the project

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.allObject



9
10
11
# File 'lib/switch_file/file_type.rb', line 9

def self.all
  @all ||= SwitchFile.file_type_attributes.map{|attributes| FileType.new(attributes) }
end

.all=(file_types) ⇒ Object



13
14
15
# File 'lib/switch_file/file_type.rb', line 13

def self.all=(file_types)
  @all = file_types
end

Instance Method Details

#generate_open_command(source_path) ⇒ Object



17
18
19
# File 'lib/switch_file/file_type.rb', line 17

def generate_open_command(source_path)
  open_command.call(source_path.class_name)
end