Class: AkamaiApi::ECCUParser
- Inherits:
-
Object
- Object
- AkamaiApi::ECCUParser
- Defined in:
- lib/akamai_api/eccu_parser.rb
Overview
The ECCUParser class is used to create a XML request file starting from a url
Constant Summary collapse
- PLACEHOLDER =
"{YIELD}"
- NOT_ALLOWED_EXTENSIONS =
%w[*]
- NOT_ALLOWED_DIRS =
%w[. ..]
Instance Attribute Summary collapse
-
#revalidate_on ⇒ Object
readonly
Returns the value of attribute revalidate_on.
-
#tokenizer ⇒ Object
readonly
Returns the value of attribute tokenizer.
-
#xml ⇒ Object
readonly
Returns the value of attribute xml.
Instance Method Summary collapse
-
#initialize(expression, revalidate_on = 'now') ⇒ ECCUParser
constructor
A new instance of ECCUParser.
Constructor Details
#initialize(expression, revalidate_on = 'now') ⇒ ECCUParser
Returns a new instance of ECCUParser.
16 17 18 19 20 21 22 23 |
# File 'lib/akamai_api/eccu_parser.rb', line 16 def initialize expression, revalidate_on = 'now' raise "Expression can't be empty" if expression.empty? revalidate_on = revalidate_on.to_i if revalidate_on != 'now' @tokenizer = ECCU::Tokenizer.new expression @revalidate_on = revalidate_on @xml = "<?xml version=\"1.0\"?>\n<eccu>#{PLACEHOLDER}</eccu>" parse end |
Instance Attribute Details
#revalidate_on ⇒ Object (readonly)
Returns the value of attribute revalidate_on.
14 15 16 |
# File 'lib/akamai_api/eccu_parser.rb', line 14 def revalidate_on @revalidate_on end |
#tokenizer ⇒ Object (readonly)
Returns the value of attribute tokenizer.
14 15 16 |
# File 'lib/akamai_api/eccu_parser.rb', line 14 def tokenizer @tokenizer end |
#xml ⇒ Object (readonly)
Returns the value of attribute xml.
14 15 16 |
# File 'lib/akamai_api/eccu_parser.rb', line 14 def xml @xml end |