Class: OsCtl::Image::Operations::Config::ParseList
- Includes:
- Lib::Utils::Log, Lib::Utils::System
- Defined in:
- lib/osctl/image/operations/config/parse_list.rb
Instance Attribute Summary collapse
- #base_dir ⇒ String readonly
- #type ⇒ Symbol readonly
Instance Method Summary collapse
- #execute ⇒ Array<String>
-
#initialize(base_dir, type) ⇒ ParseList
constructor
A new instance of ParseList.
Methods inherited from Base
Constructor Details
#initialize(base_dir, type) ⇒ ParseList
Returns a new instance of ParseList.
17 18 19 20 21 |
# File 'lib/osctl/image/operations/config/parse_list.rb', line 17 def initialize(base_dir, type) super() @base_dir = base_dir @type = type end |
Instance Attribute Details
#base_dir ⇒ String (readonly)
10 11 12 |
# File 'lib/osctl/image/operations/config/parse_list.rb', line 10 def base_dir @base_dir end |
#type ⇒ Symbol (readonly)
13 14 15 |
# File 'lib/osctl/image/operations/config/parse_list.rb', line 13 def type @type end |
Instance Method Details
#execute ⇒ Array<String>
25 26 27 28 29 30 31 |
# File 'lib/osctl/image/operations/config/parse_list.rb', line 25 def execute syscmd([ File.join(base_dir, 'bin', 'config'), type.to_s, 'list' ].join(' ')).output.split("\n") end |