Class: Parser::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/parser/client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file, options = {}) ⇒ Client

Returns a new instance of Client.



14
15
16
17
# File 'lib/parser/client.rb', line 14

def initialize(file, options = {})
  @file = file
  @options = options
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



8
9
10
# File 'lib/parser/client.rb', line 8

def data
  @data
end

#fileObject (readonly)

Returns the value of attribute file.



8
9
10
# File 'lib/parser/client.rb', line 8

def file
  @file
end

#optionsObject (readonly)

Returns the value of attribute options.



8
9
10
# File 'lib/parser/client.rb', line 8

def options
  @options
end

Class Method Details

.parse(file, options = {}) ⇒ Object



10
11
12
# File 'lib/parser/client.rb', line 10

def self.parse(file, options = {})
  new(file, options).parse
end

Instance Method Details

#parseObject



19
20
21
22
# File 'lib/parser/client.rb', line 19

def parse
  read_file
  print_data
end