Class: Android::Devices::Model

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#brandObject

Returns the value of attribute brand.



4
5
6
# File 'lib/android/devices/model.rb', line 4

def brand
  @brand
end

#deviceObject

Returns the value of attribute device.



4
5
6
# File 'lib/android/devices/model.rb', line 4

def device
  @device
end

#manufacturerObject

Returns the value of attribute manufacturer.



4
5
6
# File 'lib/android/devices/model.rb', line 4

def manufacturer
  @manufacturer
end

#modelObject

Returns the value of attribute model.



4
5
6
# File 'lib/android/devices/model.rb', line 4

def model
  @model
end

Instance Method Details

#nameObject



13
14
15
16
# File 'lib/android/devices/model.rb', line 13

def name
  return "#{@manufacturer} #{@brand}" if @brand
  "#{@manufacturer} #{@model}"
end