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.
255 256 257 258 259 260 261 262 263 264 265 266 |
# File 'lib/abide_dev_utils/sce/generate/reference.rb', line 255 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
268 269 270 271 272 273 274 275 276 |
# File 'lib/abide_dev_utils/sce/generate/reference.rb', line 268 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.
281 282 283 284 285 286 287 288 |
# File 'lib/abide_dev_utils/sce/generate/reference.rb', line 281 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 |