Class: Steep::Project::DSL::GroupDSL

Inherits:
Object
  • Object
show all
Includes:
WithPattern
Defined in:
lib/steep/project/dsl.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from WithPattern

#check, #ignore, #ignore_signature, #ignored_signatures, #ignored_sources, #signature, #signature_pattern, #signatures, #source_pattern, #sources

Constructor Details

#initialize(name, target) ⇒ GroupDSL

Returns a new instance of GroupDSL.



194
195
196
197
# File 'lib/steep/project/dsl.rb', line 194

def initialize(name, target)
  @name = name
  @target = target
end

Instance Attribute Details

#code_diagnostics_configObject (readonly)

Returns the value of attribute code_diagnostics_config.



192
193
194
# File 'lib/steep/project/dsl.rb', line 192

def code_diagnostics_config
  @code_diagnostics_config
end

#nameObject (readonly)

Returns the value of attribute name.



188
189
190
# File 'lib/steep/project/dsl.rb', line 188

def name
  @name
end

#targetObject (readonly)

Returns the value of attribute target.



190
191
192
# File 'lib/steep/project/dsl.rb', line 190

def target
  @target
end

Instance Method Details

#configure_code_diagnostics(config = nil) ⇒ Object



199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# File 'lib/steep/project/dsl.rb', line 199

def configure_code_diagnostics(config = nil)
  if block_given?
    if code_diagnostics_config
      if config
        code_diagnostics_config.merge!(config)
      end
    else
      @code_diagnostics_config = (config || target.code_diagnostics_config).dup
    end

    yield (code_diagnostics_config || raise)
  else
    @code_diagnostics_config = config&.dup
  end
end