Class: Android::Devices::Model
- Inherits:
-
Object
- Object
- Android::Devices::Model
- Defined in:
- lib/android/devices/model.rb
Instance Attribute Summary collapse
-
#brand ⇒ Object
Returns the value of attribute brand.
-
#device ⇒ Object
Returns the value of attribute device.
-
#manufacturer ⇒ Object
Returns the value of attribute manufacturer.
-
#model ⇒ Object
Returns the value of attribute model.
Instance Method Summary collapse
-
#initialize(manufacturer, brand, device, model) ⇒ Model
constructor
A new instance of Model.
- #name ⇒ Object
Constructor Details
#initialize(manufacturer, brand, device, model) ⇒ Model
6 7 8 9 10 11 |
# File 'lib/android/devices/model.rb', line 6 def initialize(manufacturer, brand, device, model) @manufacturer = manufacturer @brand = brand @device = device @model = model end |
Instance Attribute Details
#brand ⇒ Object
Returns the value of attribute brand.
4 5 6 |
# File 'lib/android/devices/model.rb', line 4 def brand @brand end |
#device ⇒ Object
Returns the value of attribute device.
4 5 6 |
# File 'lib/android/devices/model.rb', line 4 def device @device end |
#manufacturer ⇒ Object
Returns the value of attribute manufacturer.
4 5 6 |
# File 'lib/android/devices/model.rb', line 4 def manufacturer @manufacturer end |
#model ⇒ Object
Returns the value of attribute model.
4 5 6 |
# File 'lib/android/devices/model.rb', line 4 def model @model end |
Instance Method Details
#name ⇒ Object
13 14 15 16 |
# File 'lib/android/devices/model.rb', line 13 def name return "#{@manufacturer} #{@brand}" if @brand "#{@manufacturer} #{@model}" end |