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.
230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'lib/abide_dev_utils/sce/generate/reference.rb', line 230 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
243 244 245 246 247 248 249 250 251 |
# File 'lib/abide_dev_utils/sce/generate/reference.rb', line 243 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.
256 257 258 259 260 261 262 263 |
# File 'lib/abide_dev_utils/sce/generate/reference.rb', line 256 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 |