Class: IniParse::Lines::AnonymousSection
- Defined in:
- lib/iniparse/lines.rb
Overview
Stores options which appear at the beginning of a file, without a preceding section.
Instance Attribute Summary
Attributes inherited from Section
Instance Method Summary collapse
-
#initialize ⇒ AnonymousSection
constructor
A new instance of AnonymousSection.
- #to_ini ⇒ Object
Methods inherited from Section
#[], #[]=, #delete, #each, #has_option?, #merge!, #option, parse
Methods included from Line
#blank?, #comment, #has_comment?
Constructor Details
#initialize ⇒ AnonymousSection
Returns a new instance of AnonymousSection.
208 209 210 |
# File 'lib/iniparse/lines.rb', line 208 def initialize super('__anonymous__') end |
Instance Method Details
#to_ini ⇒ Object
212 213 214 215 216 |
# File 'lib/iniparse/lines.rb', line 212 def to_ini # Remove the leading space which is added by joining the blank line # content with the options. super.gsub(/\A\n/, '') end |