class Parser::Client
Attributes
data[R]
file[R]
options[R]
Public Class Methods
new(file, options = {})
click to toggle source
# File lib/parser/client.rb, line 14 def initialize(file, options = {}) @file = file @options = options end
parse(file, options = {})
click to toggle source
# File lib/parser/client.rb, line 10 def self.parse(file, options = {}) new(file, options).parse end
Public Instance Methods
parse()
click to toggle source
# File lib/parser/client.rb, line 19 def parse read_file print_data end
Private Instance Methods
print_data()
click to toggle source
# File lib/parser/client.rb, line 32 def print_data ::Parser::Presenter.new(data, options).call end
read_file()
click to toggle source
# File lib/parser/client.rb, line 26 def read_file @data ||= ::Parser::Reader.new(file).call rescue InvalidExtensionException, FileNotFoundException => e abort e.message end