Class: IpwhoApi::UserAgentBrowser

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



124
125
126
# File 'lib/ipwho.rb', line 124

def name
  @name
end

#versionObject

Returns the value of attribute version

Returns:

  • (Object)

    the current value of version



124
125
126
# File 'lib/ipwho.rb', line 124

def version
  @version
end

Class Method Details

.from_hash(hash) ⇒ Object



125
126
127
# File 'lib/ipwho.rb', line 125

def self.from_hash(hash)
  new(name: hash["name"], version: hash["version"])
end