Class: CFA::Grub2::GrubCfg::Parser
- Inherits:
-
Object
- Object
- CFA::Grub2::GrubCfg::Parser
- Defined in:
- lib/cfa/grub2/grub_cfg.rb
Class Method Summary collapse
Class Method Details
.empty ⇒ Object
24 25 26 |
# File 'lib/cfa/grub2/grub_cfg.rb', line 24 def self.empty [] end |
.parse(string) ⇒ Object
14 15 16 17 |
# File 'lib/cfa/grub2/grub_cfg.rb', line 14 def self.parse(string) = string.lines.grep(/menuentry\s*'/) .map { |line| line[/\s*menuentry\s*'([^']+)'.*/, 1] } end |
.serialize(_string) ⇒ Object
19 20 21 22 |
# File 'lib/cfa/grub2/grub_cfg.rb', line 19 def self.serialize(_string) raise NotImplementedError, "Serializing not implemented, use grub2 generator" end |