Class: HappyMapperTools::StigAttributes::DescriptionDetailsType
- Defined in:
- lib/happy_mapper_tools/stig_attributes.rb
Class Method Summary collapse
Class Method Details
.apply(value) ⇒ Object
159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/happy_mapper_tools/stig_attributes.rb', line 159 def apply(value) value = value.gsub('&', 'and') value = value.gsub('"<"', 'less than (converted less than)') DescriptionDetails.parse("<Details>#{value}</Details>") rescue Nokogiri::XML::SyntaxError => e if (value) # if there was a bad tag exit(1) else report_error(value, e) end end |
.apply?(value, _convert_to_type) ⇒ Boolean
171 172 173 |
# File 'lib/happy_mapper_tools/stig_attributes.rb', line 171 def apply?(value, _convert_to_type) value.is_a?(String) end |
.type ⇒ Object
155 156 157 |
# File 'lib/happy_mapper_tools/stig_attributes.rb', line 155 def type DescriptionDetails end |