Class: Mattock::YARDExtensions::NilFieldsHandler

Inherits:
SettingHandler
  • Object
show all
Defined in:
lib/calibrate/yard-extensions.rb

Instance Method Summary collapse

Methods inherited from SettingHandler

#append_name, #extract_name, #mattock_configurable?, #setting_method_name, #synthetic_setting

Instance Method Details

#a_nilObject



143
144
145
146
147
# File 'lib/calibrate/yard-extensions.rb', line 143

def a_nil
  v = s(:kw, nil)
  v.full_source = "nil"
  v
end

#processObject



149
150
151
152
153
154
155
# File 'lib/calibrate/yard-extensions.rb', line 149

def process
  return unless mattock_configurable?(namespace)
  remapped = statement.parameters(false).map do |name|
    synthetic_setting(extract_name(name), a_nil)
  end
  parser.process(remapped)
end