Class: VpsbClient::Builders::IssueParser
- Inherits:
-
SystemInfoParser
- Object
- SystemInfoParser
- VpsbClient::Builders::IssueParser
- Defined in:
- lib/vpsb_client/builders/system_info_parser.rb
Constant Summary collapse
- REGEX =
'^(?<os>[^\\\\]+)(?: \\\\n \\\\l)?$'
Instance Attribute Summary collapse
-
#os ⇒ Object
readonly
Returns the value of attribute os.
Instance Method Summary collapse
-
#initialize ⇒ IssueParser
constructor
A new instance of IssueParser.
- #parse ⇒ Object
Methods inherited from SystemInfoParser
#find_matches, #find_matches!, #lines
Constructor Details
#initialize ⇒ IssueParser
Returns a new instance of IssueParser.
117 118 119 |
# File 'lib/vpsb_client/builders/system_info_parser.rb', line 117 def initialize super('cat /etc/issue') end |
Instance Attribute Details
#os ⇒ Object (readonly)
Returns the value of attribute os.
113 114 115 |
# File 'lib/vpsb_client/builders/system_info_parser.rb', line 113 def os @os end |
Instance Method Details
#parse ⇒ Object
121 122 123 124 |
# File 'lib/vpsb_client/builders/system_info_parser.rb', line 121 def parse matches = find_matches!(REGEX) @os = matches[:os] end |