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?, #options
Constructor Details
#initialize ⇒ AnonymousSection
Returns a new instance of AnonymousSection.
226 227 228 |
# File 'lib/iniparse/lines.rb', line 226 def initialize super('__anonymous__') end |
Instance Method Details
#to_ini ⇒ Object
230 231 232 233 234 |
# File 'lib/iniparse/lines.rb', line 230 def to_ini # Remove the leading space which is added by joining the blank line # content with the options. super.gsub(/\A\n/, '') end |