Class: AbideDevUtils::XCCDF::Parser::Objects::AttributeValue
- Inherits:
-
ElementBase
- Object
- ElementBase
- AbideDevUtils::XCCDF::Parser::Objects::AttributeValue
- Defined in:
- lib/abide_dev_utils/xccdf/parser/objects.rb
Overview
Represents a value of an element attribute
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from ElementBase
#child_labels, #children, #link_labels
Instance Method Summary collapse
-
#initialize(element, attribute) ⇒ AttributeValue
constructor
A new instance of AttributeValue.
- #to_s ⇒ Object
Methods inherited from ElementBase
#add_link, #add_links, #all_values, #label, #method_missing, #respond_to_missing?, #xccdf_type, xmlns, xpath
Methods included from Helpers::XPath
Methods included from Helpers::ElementChildren
Methods included from DigestObject
#digest, #digest_equal?, #digest_similarity, #digestable_instance_variables, #exclude_from_digest, #labeled_self_digest, #non_compatible?, #normalize_exclusion, #sorted_digest_parts, #split_labeled_digest
Constructor Details
#initialize(element, attribute) ⇒ AttributeValue
Returns a new instance of AttributeValue.
204 205 206 207 208 |
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 204 def initialize(element, attribute) super @attribute = attribute @value = element[attribute] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class AbideDevUtils::XCCDF::Parser::Objects::ElementBase
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
202 203 204 |
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 202 def attribute @attribute end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
202 203 204 |
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 202 def value @value end |
Instance Method Details
#to_s ⇒ Object
210 211 212 |
# File 'lib/abide_dev_utils/xccdf/parser/objects.rb', line 210 def to_s "#{@attribute}=#{@value}" end |