Class: SaltParser::Swift::Builder

Inherits:
Builder
  • Object
show all
Defined in:
lib/swift/builder.rb

Instance Attribute Summary

Attributes inherited from Builder

#body, #content, #headers, #parser

Instance Method Summary collapse

Constructor Details

#initialize(resource) ⇒ Builder

Returns a new instance of Builder.



4
5
6
7
8
9
# File 'lib/swift/builder.rb', line 4

def initialize(resource)
  resource = open_resource(resource)
  resource.rewind

  @parser  = SaltParser::Swift::Parser.new(:data => convert_to_utf8(resource.read))
end