Class: PartGroup
- Inherits:
-
Object
- Object
- PartGroup
- Extended by:
- Forwardable
- Includes:
- Comparable
- Defined in:
- lib/rmsgen/part_group.rb
Constant Summary collapse
- CRNL =
Carriage return new line.
/\r\n/
- CRNL_CRNL =
/\r\n\r\n/
- DELIMETER =
"\n\n"
- NL =
/\n/
- NL_NL =
/\n\n/
- NL_PLACEHOLDER =
'[newline]'
- SPACE =
' '
Instance Attribute Summary collapse
-
#parts ⇒ Object
readonly
Returns the value of attribute parts.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(text) ⇒ PartGroup
constructor
A new instance of PartGroup.
Constructor Details
#initialize(text) ⇒ PartGroup
Returns a new instance of PartGroup.
22 23 24 25 26 |
# File 'lib/rmsgen/part_group.rb', line 22 def initialize(text) @text = text @parts = [] assign_parts! end |
Instance Attribute Details
#parts ⇒ Object (readonly)
Returns the value of attribute parts.
17 18 19 |
# File 'lib/rmsgen/part_group.rb', line 17 def parts @parts end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
17 18 19 |
# File 'lib/rmsgen/part_group.rb', line 17 def text @text end |
Instance Method Details
#<=>(other) ⇒ Object
28 29 30 |
# File 'lib/rmsgen/part_group.rb', line 28 def <=>(other) parts.map(&:to_s) <=> other.map(&:to_s) end |