Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/apache/apachify.rb
Overview
Ruby arrays
Instance Method Summary collapse
-
#apachify ⇒ Object
Apachify all the elements within this array.
- #blockify ⇒ Object
- #headerize ⇒ Object
- #quoteize ⇒ Object
- #quoteize! ⇒ Object
- #rewrite_cond_optionify ⇒ Object
- #rewrite_option_listify ⇒ Object
Instance Method Details
#apachify ⇒ Object
Apachify all the elements within this array
83 84 85 |
# File 'lib/apache/apachify.rb', line 83 def apachify self.collect(&:apachify) end |
#blockify ⇒ Object
95 96 97 |
# File 'lib/apache/apachify.rb', line 95 def blockify self.quoteize * " " end |
#headerize ⇒ Object
101 102 103 |
# File 'lib/apache/apachify.rb', line 101 def headerize "#{self.first.quoteize} #{self.last}" end |
#quoteize ⇒ Object
87 88 89 |
# File 'lib/apache/apachify.rb', line 87 def quoteize self.collect(&:quoteize) end |
#quoteize! ⇒ Object
91 92 93 |
# File 'lib/apache/apachify.rb', line 91 def quoteize! self.collect!(&:quoteize) end |
#rewrite_cond_optionify ⇒ Object
105 106 107 108 109 110 111 112 113 |
# File 'lib/apache/apachify.rb', line 105 def rewrite_cond_optionify self.collect do |opt| { :or => 'OR', :case_insensitive => 'NC', :no_vary => 'NV' }[opt] end end |
#rewrite_option_listify ⇒ Object
115 116 117 |
# File 'lib/apache/apachify.rb', line 115 def rewrite_option_listify (!self.empty?) ? "[#{self * ','}]" : nil end |