Class: Paxmex::SchemaProxy

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(schema_name) ⇒ SchemaProxy

Returns a new instance of SchemaProxy.



7
8
9
# File 'lib/paxmex.rb', line 7

def initialize(schema_name)
  @schema_name = schema_name
end

Instance Attribute Details

#schema_nameObject (readonly)

Returns the value of attribute schema_name.



5
6
7
# File 'lib/paxmex.rb', line 5

def schema_name
  @schema_name
end

Instance Method Details

#load_file(file, opts = {}) ⇒ Object



15
16
17
# File 'lib/paxmex.rb', line 15

def load_file(file, opts = {})
  parse(File.read(file), opts)
end

#parse(data, opts = {}) ⇒ Object



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

def parse(data, opts = {})
  Parser.new(data, schema_name).parse(opts)
end