Class: OsuRuby::Parser::Section
- Inherits:
-
Object
- Object
- OsuRuby::Parser::Section
- Defined in:
- (osu-ruby2 0.0.2) osu-ruby2/parser/content.rb
Overview
Instance Attribute Summary collapse
-
#contents ⇒ Array<Entry>
readonly
Parsed contents.
-
#name ⇒ String
Section name.
Class Method Summary collapse
- .create(entry_class, &block) ⇒ Object
-
.entry ⇒ Class<Entry>
Entry class that represents the available parser.
-
.inherited(cls)
Upon inheriting, subclasses can use
#entry=
function to configure the expected Entry class to parse the strings.
Instance Method Summary collapse
-
#initialize(name, str) ⇒ Section
constructor
A new instance of Section.
-
#to_s ⇒ String
Section content converted into osu!-compatible string.
Constructor Details
#initialize(name, str) ⇒ Section
Returns a new instance of Section.
Instance Attribute Details
#contents ⇒ Array<Entry> (readonly)
Returns parsed contents.
#name ⇒ String
Returns section name.
Class Method Details
.create(entry_class, &block) ⇒ Object
.entry ⇒ Class<Entry>
Returns entry class that represents the available parser.
.inherited(cls)
This method returns an undefined value.
Upon inheriting, subclasses can use #entry=
function to configure the expected Entry class to parse the strings.
Instance Method Details
#to_s ⇒ String
Returns section content converted into osu!-compatible string.