Class: Swiftfake::SourceKitParser
- Inherits:
-
Object
- Object
- Swiftfake::SourceKitParser
- Defined in:
- lib/swiftfake/source_kit_parser.rb
Defined Under Namespace
Classes: FunctionParser
Instance Attribute Summary collapse
-
#source_file ⇒ Object
readonly
Returns the value of attribute source_file.
-
#structure_json ⇒ Object
readonly
Returns the value of attribute structure_json.
Instance Method Summary collapse
Instance Attribute Details
#source_file ⇒ Object (readonly)
Returns the value of attribute source_file.
8 9 10 |
# File 'lib/swiftfake/source_kit_parser.rb', line 8 def source_file @source_file end |
#structure_json ⇒ Object (readonly)
Returns the value of attribute structure_json.
8 9 10 |
# File 'lib/swiftfake/source_kit_parser.rb', line 8 def structure_json @structure_json end |
Instance Method Details
#parse(source_file, raw_structure_json) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/swiftfake/source_kit_parser.rb', line 10 def parse(source_file, raw_structure_json) @source_file = source_file @structure_json = JSON.parse(raw_structure_json) SwiftClass.new( name: class_name, access: access_level, functions: parse_functions, imports: imports ) end |