Class: Trith::Reader

Inherits:
Object
  • Object
show all
Defined in:
lib/trith/reader.rb

Overview

The Trith code parser.

See Also:

Class Method Summary (collapse)

Class Method Details

+ (Object) read(input, options = {})

Parameters:

  • (IO, StringIO, String) input
  • (Hash{Symbol => Object}) options (defaults to: {})

Returns:

  • (Object)


43
44
45
# File 'lib/trith/reader.rb', line 43

def self.read(input, options = {})
  SXP.read(input, options)
end

+ (Enumerable<Object>) read_all(input, options = {})

Parameters:

  • (IO, StringIO, String) input
  • (Hash{Symbol => Object}) options (defaults to: {})

Returns:

  • (Enumerable<Object>)


35
36
37
# File 'lib/trith/reader.rb', line 35

def self.read_all(input, options = {})
  SXP.read_all(input, options)
end

+ (Enumerable<Object>) read_file(filename, options = {})

Parameters:

  • (String, #to_s) filename
  • (Hash{Symbol => Object}) options (defaults to: {})

Returns:

  • (Enumerable<Object>)


27
28
29
# File 'lib/trith/reader.rb', line 27

def self.read_file(filename, options = {})
  SXP.read_file(filename, options)
end

+ (Enumerable<Object>) read_files(*filenames)

Parameters:

  • (Enumerable<String>) filenames
  • (Hash{Symbol => Object}) options

Returns:

  • (Enumerable<Object>)


19
20
21
# File 'lib/trith/reader.rb', line 19

def self.read_files(*filenames)
  SXP.read_files(*filenames)
end

+ (Enumerable<Object>) read_url(url, options = {})

Parameters:

  • (String, #to_s) url
  • (Hash{Symbol => Object}) options (defaults to: {})

Returns:

  • (Enumerable<Object>)


11
12
13
# File 'lib/trith/reader.rb', line 11

def self.read_url(url, options = {})
  SXP.read_url(url, options)
end