Class: Steep::Project::DSL::TargetDSL
- Includes:
- LibraryOptions, WithPattern
- Defined in:
- lib/steep/project/dsl.rb
Instance Attribute Summary collapse
-
#groups ⇒ Object
readonly
Returns the value of attribute groups.
-
#implicitly_returns_nil ⇒ Object
readonly
Returns the value of attribute implicitly_returns_nil.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
-
#unreferenced ⇒ Object
readonly
Returns the value of attribute unreferenced.
Attributes included from LibraryOptions
#collection_config_path, #core_root, #stdlib_root
Instance Method Summary collapse
- #code_diagnostics_config ⇒ Object
- #configure_code_diagnostics(hash = nil) {|code_diagnostics_config| ... } ⇒ Object
- #group(name, &block) ⇒ Object
- #implicitly_returns_nil!(value = true) ⇒ Object
-
#initialize(name, project:) ⇒ TargetDSL
constructor
A new instance of TargetDSL.
- #initialize_copy(other) ⇒ Object
- #unreferenced!(value = true) ⇒ Object
Methods included from WithPattern
#check, #ignore, #ignore_signature, #ignored_inline_sources, #ignored_signatures, #ignored_sources, #inline_source_pattern, #inline_sources, #signature, #signature_pattern, #signatures, #source_pattern, #sources
Methods included from LibraryOptions
#collection_config, #disable_collection, #libraries, #library, #library_configured?, #repo_path, #repo_paths, #stdlib_path, #to_library_options
Constructor Details
#initialize(name, project:) ⇒ TargetDSL
Returns a new instance of TargetDSL.
144 145 146 147 148 149 150 151 152 153 |
# File 'lib/steep/project/dsl.rb', line 144 def initialize(name, project:) @name = name @core_root = nil @stdlib_root = nil @project = project @collection_config_path = collection_config_path @unreferenced = false @implicitly_returns_nil = false @groups = [] end |
Instance Attribute Details
#groups ⇒ Object (readonly)
Returns the value of attribute groups.
141 142 143 |
# File 'lib/steep/project/dsl.rb', line 141 def groups @groups end |
#implicitly_returns_nil ⇒ Object (readonly)
Returns the value of attribute implicitly_returns_nil.
142 143 144 |
# File 'lib/steep/project/dsl.rb', line 142 def implicitly_returns_nil @implicitly_returns_nil end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
138 139 140 |
# File 'lib/steep/project/dsl.rb', line 138 def name @name end |
#project ⇒ Object (readonly)
Returns the value of attribute project.
139 140 141 |
# File 'lib/steep/project/dsl.rb', line 139 def project @project end |
#unreferenced ⇒ Object (readonly)
Returns the value of attribute unreferenced.
140 141 142 |
# File 'lib/steep/project/dsl.rb', line 140 def unreferenced @unreferenced end |
Instance Method Details
#code_diagnostics_config ⇒ Object
189 190 191 |
# File 'lib/steep/project/dsl.rb', line 189 def code_diagnostics_config @code_diagnostics_config ||= Diagnostic::Ruby.default.dup end |
#configure_code_diagnostics(hash = nil) {|code_diagnostics_config| ... } ⇒ Object
181 182 183 184 185 186 187 |
# File 'lib/steep/project/dsl.rb', line 181 def configure_code_diagnostics(hash = nil) if hash code_diagnostics_config.merge!(hash) end yield code_diagnostics_config if block_given? end |
#group(name, &block) ⇒ Object
193 194 195 196 197 198 199 200 201 202 |
# File 'lib/steep/project/dsl.rb', line 193 def group(name, &block) name = name.to_str.to_sym unless Symbol === name group = GroupDSL.new(name, self) Steep.logger.tagged "group=#{name}" do group.instance_exec(&block) if block end groups << group end |
#implicitly_returns_nil!(value = true) ⇒ Object
177 178 179 |
# File 'lib/steep/project/dsl.rb', line 177 def implicitly_returns_nil!(value = true) @implicitly_returns_nil = value end |
#initialize_copy(other) ⇒ Object
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/steep/project/dsl.rb', line 155 def initialize_copy(other) @name = other.name @libraries = other.libraries.dup @sources = other.sources.dup @signatures = other.signatures.dup @ignored_sources = other.ignored_sources.dup @ignored_signatures = other.ignored_signatures.dup @repo_paths = other.repo_paths.dup @core_root = other.core_root @stdlib_root = other.stdlib_root @code_diagnostics_config = other.code_diagnostics_config.dup @project = other.project @collection_config_path = other.collection_config_path @unreferenced = other.unreferenced @implicitly_returns_nil = other.implicitly_returns_nil @groups = other.groups.dup end |
#unreferenced!(value = true) ⇒ Object
173 174 175 |
# File 'lib/steep/project/dsl.rb', line 173 def unreferenced!(value = true) @unreferenced = value end |