Class: FireEagle::StringWithExactMatch
- Inherits:
-
String
- Object
- String
- FireEagle::StringWithExactMatch
- Defined in:
- lib/fireeagle/location.rb
Instance Attribute Summary collapse
-
#exact_match ⇒ Object
writeonly
Sets the attribute exact_match.
Instance Method Summary collapse
- #exact_match? ⇒ Boolean
-
#initialize(value = "") ⇒ StringWithExactMatch
constructor
A new instance of StringWithExactMatch.
Constructor Details
#initialize(value = "") ⇒ StringWithExactMatch
Returns a new instance of StringWithExactMatch.
5 6 7 8 9 10 11 12 |
# File 'lib/fireeagle/location.rb', line 5 def initialize(value = "") node = XML::Parser.string(value).parse.root str = super(node.content) str.exact_match = node.attributes.to_h["exact-match"] == "true" node = nil str end |
Instance Attribute Details
#exact_match=(value) ⇒ Object (writeonly)
Sets the attribute exact_match
3 4 5 |
# File 'lib/fireeagle/location.rb', line 3 def exact_match=(value) @exact_match = value end |
Instance Method Details
#exact_match? ⇒ Boolean
14 15 16 |
# File 'lib/fireeagle/location.rb', line 14 def exact_match? @exact_match end |