Class: SPF::Query::Modifier
- Inherits:
-
Object
- Object
- SPF::Query::Modifier
- Defined in:
- lib/spf/query/modifier.rb
Overview
Represents SPF record modifiers.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Symbol
readonly
Modifier name.
-
#value ⇒ String, ...
readonly
Modifier value.
Instance Method Summary collapse
-
#initialize(name, value = nil) ⇒ Modifier
constructor
Initializes the modifier.
-
#to_s ⇒ String
Converts the modifier to a String.
Constructor Details
#initialize(name, value = nil) ⇒ Modifier
Initializes the modifier.
27 28 29 |
# File 'lib/spf/query/modifier.rb', line 27 def initialize(name,value=nil) @name, @value = name, value end |
Instance Attribute Details
#name ⇒ Symbol (readonly)
Modifier name.
11 12 13 |
# File 'lib/spf/query/modifier.rb', line 11 def name @name end |
#value ⇒ String, ... (readonly)
Modifier value.
16 17 18 |
# File 'lib/spf/query/modifier.rb', line 16 def value @value end |
Instance Method Details
#to_s ⇒ String
Converts the modifier to a String.
36 37 38 39 40 |
# File 'lib/spf/query/modifier.rb', line 36 def to_s if @value then "#{@name}=#{@value}" else "#{@name}" end end |