Class: FireEagle::StringWithExactMatch

Inherits:
String
  • Object
show all
Defined in:
lib/fireeagle/location.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

Parameters:

  • value

    the value to set the attribute exact_match to.



3
4
5
# File 'lib/fireeagle/location.rb', line 3

def exact_match=(value)
  @exact_match = value
end

Instance Method Details

#exact_match?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/fireeagle/location.rb', line 14

def exact_match?
  @exact_match
end