Class: BabelDiff::ImportFileHandler::PhraseFile

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



26
27
28
# File 'lib/babel_diff/import_file_handler.rb', line 26

def path
  @path
end

Instance Method Details

#contentsObject



32
33
34
# File 'lib/babel_diff/import_file_handler.rb', line 32

def contents
  File.read(path)
end

#languageObject



28
29
30
# File 'lib/babel_diff/import_file_handler.rb', line 28

def language
  path.split("/").last.match(/phrase.(.*).yml/)[1]
end