Class: SwiftGenerator::Generator

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(spec_file_path, out_dir_str) ⇒ Generator

Returns a new instance of Generator.



12
13
14
15
# File 'lib/swift_generator.rb', line 12

def initialize( spec_file_path, out_dir_str )
  @spec_file_path = spec_file_path
  @out_dir_path = out_dir_str         # may be nil
end

Instance Attribute Details

#out_dir_pathObject

Returns the value of attribute out_dir_path.



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

def out_dir_path
  @out_dir_path
end

#spec_file_pathObject

Returns the value of attribute spec_file_path.



9
10
11
# File 'lib/swift_generator.rb', line 9

def spec_file_path
  @spec_file_path
end

Instance Method Details

#generateObject



17
18
19
20
21
# File 'lib/swift_generator.rb', line 17

def generate
  parser = SpecfileParser.new( @spec_file_path )
  parser.process_specfile( )

end