Class: Coppertone::MacroString::MacroLiteral
- Inherits:
-
Object
- Object
- Coppertone::MacroString::MacroLiteral
- Defined in:
- lib/coppertone/macro_string/macro_literal.rb
Overview
A internal class that represents a fixed string in the macro template, whose value will not depend on the SPF request context.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #expand(_context, _request = nil) ⇒ Object
-
#initialize(s) ⇒ MacroLiteral
constructor
A new instance of MacroLiteral.
- #to_s ⇒ Object
Constructor Details
#initialize(s) ⇒ MacroLiteral
Returns a new instance of MacroLiteral.
6 7 8 |
# File 'lib/coppertone/macro_string/macro_literal.rb', line 6 def initialize(s) @str = s end |
Instance Method Details
#==(other) ⇒ Object
18 19 20 21 |
# File 'lib/coppertone/macro_string/macro_literal.rb', line 18 def ==(other) return false unless other.instance_of? self.class to_s == other.to_s end |
#expand(_context, _request = nil) ⇒ Object
10 11 12 |
# File 'lib/coppertone/macro_string/macro_literal.rb', line 10 def (_context, _request = nil) @str end |
#to_s ⇒ Object
14 15 16 |
# File 'lib/coppertone/macro_string/macro_literal.rb', line 14 def to_s @str end |