Class: EmuCtl::Avd

Inherits:
Object
  • Object
show all
Defined in:
lib/emu_ctl/model.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(desc) ⇒ Avd

Returns a new instance of Avd.



24
25
26
27
28
29
30
# File 'lib/emu_ctl/model.rb', line 24

def initialize(desc)
  @lines = desc.split("\n")
  @name = /Name: (.+)/.match(desc)[1]
  @skin = /Skin: (.+)/.match(desc)[1]
  @target = /Target: (.+)/.match(desc)[1]
  @abi = /Tag\/ABI: (.+)/.match(desc)[1]
end

Instance Attribute Details

#abiObject

Returns the value of attribute abi.



22
23
24
# File 'lib/emu_ctl/model.rb', line 22

def abi
  @abi
end

#nameObject

Returns the value of attribute name.



22
23
24
# File 'lib/emu_ctl/model.rb', line 22

def name
  @name
end

#skinObject

Returns the value of attribute skin.



22
23
24
# File 'lib/emu_ctl/model.rb', line 22

def skin
  @skin
end

#targetObject

Returns the value of attribute target.



22
23
24
# File 'lib/emu_ctl/model.rb', line 22

def target
  @target
end

Instance Method Details

#has_id?(id) ⇒ Boolean

Returns:

  • (Boolean)


32
33
34
35
# File 'lib/emu_ctl/model.rb', line 32

def has_id?(id)
  puts "checking me '#{@name}' for '#{id}'"
  @name.include?(id)
end

#to_sObject



37
38
39
# File 'lib/emu_ctl/model.rb', line 37

def to_s
  "#{@name}"
end