Class: AbideDevUtils::Sce::Generate::Reference::ControlMarkdown
- Inherits:
-
Object
- Object
- AbideDevUtils::Sce::Generate::Reference::ControlMarkdown
- Defined in:
- lib/abide_dev_utils/sce/generate/reference.rb
Overview
Generates markdown for a control
Instance Method Summary collapse
- #generate! ⇒ Object
-
#initialize(control, md, strings, module_name, framework, formatter: nil, opts: {}) ⇒ ControlMarkdown
constructor
A new instance of ControlMarkdown.
-
#verify_profile_and_level_selections ⇒ Boolean
This function gets the array of string representations of profiles and levels from the control based on selection filters in opts, if any.
Constructor Details
#initialize(control, md, strings, module_name, framework, formatter: nil, opts: {}) ⇒ ControlMarkdown
Returns a new instance of ControlMarkdown.
247 248 249 250 251 252 253 254 255 256 257 258 |
# File 'lib/abide_dev_utils/sce/generate/reference.rb', line 247 def initialize(control, md, strings, module_name, framework, formatter: nil, opts: {}) @control = control @md = md @strings = strings @module_name = module_name @framework = framework @formatter = formatter.nil? ? TypeExprValueFormatter : formatter @opts = opts @valid_level = [] @valid_profile = [] @control_data = {} end |
Instance Method Details
#generate! ⇒ Object
260 261 262 263 264 265 266 267 268 |
# File 'lib/abide_dev_utils/sce/generate/reference.rb', line 260 def generate! heading_builder control_params_builder control_profiles_levels_builder config_example_builder control_alternate_ids_builder dependent_controls_builder resource_reference_builder end |
#verify_profile_and_level_selections ⇒ Boolean
This function gets the array of string representations of profiles and levels from the control based on selection filters in opts, if any.
273 274 275 276 277 278 279 280 |
# File 'lib/abide_dev_utils/sce/generate/reference.rb', line 273 def verify_profile_and_level_selections @valid_profs_lvls = @control.filtered_profiles_levels( prof: @opts[:select_profile], lvl: @opts[:select_level] ) @valid_profs_lvls.uniq! !@valid_profs_lvls.empty? end |