Module: DotStrings

Defined in:
lib/dotstrings.rb,
lib/dotstrings/file.rb,
lib/dotstrings/item.rb,
lib/dotstrings/errors.rb,
lib/dotstrings/parser.rb,
lib/dotstrings/version.rb

Defined Under Namespace

Classes: File, Item, Parser, ParsingError

Constant Summary collapse

VERSION =
'0.6.0'

Class Method Summary collapse

Class Method Details

.parse(io, strict: true) ⇒ DotStrings::File

Parses a file from the given IO object.

This is a convenience method for DotStrings::File.parse.

Parameters:

  • io (IO)

    The IO object to parse.

  • strict (Boolean) (defaults to: true)

    Whether to parse in strict mode.

Returns:



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

def self.parse(io, strict: true)
  File.parse(io, strict: strict)
end

.parse_file(path, strict: true) ⇒ DotStrings::File

Parses a .strings file at the given path.

This is a convenience method for DotStrings::File.parse_file.

Parameters:

  • path (String)

    The path to the .strings file to parse.

  • strict (Boolean) (defaults to: true)

    Whether to parse in strict mode.

Returns:



29
30
31
# File 'lib/dotstrings.rb', line 29

def self.parse_file(path, strict: true)
  File.parse_file(path, strict: strict)
end