class EmuCtl::Target
Attributes
abi[RW]
api_lvl[RW]
id[RW]
name[RW]
skins[RW]
Public Class Methods
new(desc)
click to toggle source
# File lib/emu_ctl/model.rb, line 6 def initialize(desc) @lines = desc.split("\n") @id = /id: \d+ .* "(.+)"/.match(desc)[1] @name = /Name: (.+)/.match(desc)[1] @skins = /Skins: (.*)/.match(desc)[1].split(',').map{|n| n.strip} @abi = /ABIs : (.+)/.match(desc)[1] @abi = nil if @abi.include?('no ABIs.') @api_lvl = /API level.? (\d+)/.match(desc)[1].to_i end
Public Instance Methods
to_s()
click to toggle source
# File lib/emu_ctl/model.rb, line 16 def to_s "#{@id}\n\tName: #{@name}\n\t#{@skins}\n\tABI: #{abi}" end