Class: EmuCtl::Avd
- Inherits:
-
Object
- Object
- EmuCtl::Avd
- Defined in:
- lib/emu_ctl/model.rb
Instance Attribute Summary collapse
-
#abi ⇒ Object
Returns the value of attribute abi.
-
#name ⇒ Object
Returns the value of attribute name.
-
#skin ⇒ Object
Returns the value of attribute skin.
-
#target ⇒ Object
Returns the value of attribute target.
Instance Method Summary collapse
- #has_id?(id) ⇒ Boolean
-
#initialize(desc) ⇒ Avd
constructor
A new instance of Avd.
- #to_s ⇒ Object
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
#abi ⇒ Object
Returns the value of attribute abi.
22 23 24 |
# File 'lib/emu_ctl/model.rb', line 22 def abi @abi end |
#name ⇒ Object
Returns the value of attribute name.
22 23 24 |
# File 'lib/emu_ctl/model.rb', line 22 def name @name end |
#skin ⇒ Object
Returns the value of attribute skin.
22 23 24 |
# File 'lib/emu_ctl/model.rb', line 22 def skin @skin end |
#target ⇒ Object
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
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_s ⇒ Object
37 38 39 |
# File 'lib/emu_ctl/model.rb', line 37 def to_s "#{@name}" end |