class Objc2swiftAssistant::ObjC2SwiftConfiguration
Attributes
block_converter[RW]
log_level[RW]
structure_option[RW]
type_mapper[RW]
Public Class Methods
new( config_hash, log_level_name, structure_option )
click to toggle source
Calls superclass method
Objc2swiftAssistant::FileHierarchicalConfig::new
# File lib/objc2swift_assistant/objc_2_swift_configuration.rb, line 45 def initialize( config_hash, log_level_name, structure_option ) super( config_hash, ALL_CONFIG_KEYS ) @node_class = ObjC2SwiftConfigNode @type_mapper = Objc2SwiftTypeMapper.new() @block_converter = Objc2SwiftBlockConverter.new( @type_mapper ) @log_level = LOG_LEVELS_BY_NAME[ log_level_name ] @structure_option = structure_option end
Public Instance Methods
company_name( file_path )
click to toggle source
# File lib/objc2swift_assistant/objc_2_swift_configuration.rb, line 61 def company_name( file_path ) config_value( file_path, COMPANY_NAME_KEY ) end
dump_only_errors()
click to toggle source
# File lib/objc2swift_assistant/objc_2_swift_configuration.rb, line 90 def dump_only_errors @structure_option == 'errors' end
dump_source()
click to toggle source
# File lib/objc2swift_assistant/objc_2_swift_configuration.rb, line 86 def dump_source [ 'all', 'errors' ].include?( @structure_option ) end
emit_original_bodies( file_path )
click to toggle source
# File lib/objc2swift_assistant/objc_2_swift_configuration.rb, line 69 def emit_original_bodies( file_path ) config_value_defaulted( file_path, EMIT_ORIGINAL_BODIES_KEY, true ) end
emit_original_signatures( file_path )
click to toggle source
# File lib/objc2swift_assistant/objc_2_swift_configuration.rb, line 65 def emit_original_signatures( file_path ) config_value_defaulted( file_path, EMIT_ORIGINAL_SIGNATURES_KEY, true ) end
emit_unconverted_content( file_path )
click to toggle source
# File lib/objc2swift_assistant/objc_2_swift_configuration.rb, line 73 def emit_unconverted_content( file_path ) config_value_defaulted( file_path, EMIT_UNCONVERTED_CONTENT_KEY, true ) end
log_verbose( str )
click to toggle source
Logging
# File lib/objc2swift_assistant/objc_2_swift_configuration.rb, line 78 def log_verbose( str ) puts( str ) if @log_level >= LOG_LEVEL_VERBOSE end
log_warning( str )
click to toggle source
# File lib/objc2swift_assistant/objc_2_swift_configuration.rb, line 82 def log_warning( str ) puts( "WARNING: " + str ) if @log_level >= LOG_LEVEL_WARNINGS end
omit_file( file_path )
click to toggle source
# File lib/objc2swift_assistant/objc_2_swift_configuration.rb, line 54 def omit_file( file_path ) # val = config_value(file_path, OMIT_FILE_KEY) # puts( "Omit File: #{file_path} #{val ? 'true' : 'false' }" ) # nil will evaluate to false config_value( file_path, OMIT_FILE_KEY ) end