Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/rsokoban/extensions.rb
Instance Method Summary collapse
-
#get_xsb_info_line ⇒ Object
In xsb files, an information line start with a semi-colon.
-
#get_xsb_info_line_chomp ⇒ Object
In xsb files, an information line start with a semi-colon.
Instance Method Details
#get_xsb_info_line ⇒ Object
In xsb files, an information line start with a semi-colon. I remove it, remove leading and trailing spaces and inject a newline to the end.
11 12 13 |
# File 'lib/rsokoban/extensions.rb', line 11 def get_xsb_info_line self.get_xsb_info_line_chomp + "\n" end |
#get_xsb_info_line_chomp ⇒ Object
In xsb files, an information line start with a semi-colon. I remove it and also remove leading and trailing spaces.
23 24 25 |
# File 'lib/rsokoban/extensions.rb', line 23 def get_xsb_info_line_chomp self.sub(/;/, '').strip end |