Class: AwesomeXML::Duration::Format::StaticChunk
- Inherits:
-
Object
- Object
- AwesomeXML::Duration::Format::StaticChunk
- Defined in:
- lib/awesome_xml/duration/format/static_chunk.rb
Instance Attribute Summary collapse
-
#format_chars ⇒ Object
Returns the value of attribute format_chars.
Instance Method Summary collapse
-
#dynamic? ⇒ Boolean
Counterpart of the same method of ‘AwesomeXML::Duration::Format::DynamicChunk`.
-
#initialize ⇒ StaticChunk
constructor
A new instance of StaticChunk.
-
#parse_length ⇒ Object
Returns the number of the defining characters.
-
#to_s ⇒ Object
Returns the defining characters joint into a string.
Constructor Details
#initialize ⇒ StaticChunk
Returns a new instance of StaticChunk.
11 12 13 |
# File 'lib/awesome_xml/duration/format/static_chunk.rb', line 11 def initialize @format_chars = [] end |
Instance Attribute Details
#format_chars ⇒ Object
Returns the value of attribute format_chars.
9 10 11 |
# File 'lib/awesome_xml/duration/format/static_chunk.rb', line 9 def format_chars @format_chars end |
Instance Method Details
#dynamic? ⇒ Boolean
Counterpart of the same method of ‘AwesomeXML::Duration::Format::DynamicChunk`. Used to differentiate between instances of these two classes.
27 28 29 |
# File 'lib/awesome_xml/duration/format/static_chunk.rb', line 27 def dynamic? false end |
#parse_length ⇒ Object
Returns the number of the defining characters.
21 22 23 |
# File 'lib/awesome_xml/duration/format/static_chunk.rb', line 21 def parse_length format_chars.length end |
#to_s ⇒ Object
Returns the defining characters joint into a string.
16 17 18 |
# File 'lib/awesome_xml/duration/format/static_chunk.rb', line 16 def to_s format_chars.join end |