Class: IpwhoApi::UserAgentDevice

Inherits:
Struct
  • Object
show all
Defined in:
lib/ipwho.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#modelObject

Returns the value of attribute model

Returns:

  • (Object)

    the current value of model



142
143
144
# File 'lib/ipwho.rb', line 142

def model
  @model
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



142
143
144
# File 'lib/ipwho.rb', line 142

def type
  @type
end

#vendorObject

Returns the value of attribute vendor

Returns:

  • (Object)

    the current value of vendor



142
143
144
# File 'lib/ipwho.rb', line 142

def vendor
  @vendor
end

Class Method Details

.from_hash(hash) ⇒ Object



143
144
145
# File 'lib/ipwho.rb', line 143

def self.from_hash(hash)
  new(type: hash["type"], vendor: hash["vendor"], model: hash["model"])
end