Class: AppleModels::Device

Inherits:
Object
  • Object
show all
Defined in:
lib/apple_models/device.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Device

Returns a new instance of Device.



8
9
10
# File 'lib/apple_models/device.rb', line 8

def initialize params
  params.each { |k,v| instance_variable_set("@#{k}", v) }
end

Instance Attribute Details

#extendedObject (readonly)

Returns the value of attribute extended.



3
4
5
# File 'lib/apple_models/device.rb', line 3

def extended
  @extended
end

#identifierObject (readonly)

Returns the value of attribute identifier.



3
4
5
# File 'lib/apple_models/device.rb', line 3

def identifier
  @identifier
end

#modelObject (readonly)

Returns the value of attribute model.



3
4
5
# File 'lib/apple_models/device.rb', line 3

def model
  @model
end

#versionObject (readonly)

Returns the value of attribute version.



3
4
5
# File 'lib/apple_models/device.rb', line 3

def version
  @version
end

Instance Method Details

#friendly_nameObject



12
13
14
# File 'lib/apple_models/device.rb', line 12

def friendly_name
  "#{model} #{version}"
end