Class: BabelDiff::ImportFileHandler::ImportFile

Inherits:
Struct
  • Object
show all
Defined in:
lib/babel_diff/import_file_handler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



38
39
40
# File 'lib/babel_diff/import_file_handler.rb', line 38

def path
  @path
end

Instance Method Details

#contentsObject



44
45
46
# File 'lib/babel_diff/import_file_handler.rb', line 44

def contents
  File.read(path)
end

#languageObject



40
41
42
# File 'lib/babel_diff/import_file_handler.rb', line 40

def language
  path.split("/")[-2]
end