Class: IpwhoApi::UserAgentEngine

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



130
131
132
# File 'lib/ipwho.rb', line 130

def name
  @name
end

#versionObject

Returns the value of attribute version

Returns:

  • (Object)

    the current value of version



130
131
132
# File 'lib/ipwho.rb', line 130

def version
  @version
end

Class Method Details

.from_hash(hash) ⇒ Object



131
132
133
# File 'lib/ipwho.rb', line 131

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