Class: IpwhoApi::Currency

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#codeObject

Returns the value of attribute code

Returns:

  • (Object)

    the current value of code



83
84
85
# File 'lib/ipwho.rb', line 83

def code
  @code
end

#hexUnicodeObject

Returns the value of attribute hexUnicode

Returns:

  • (Object)

    the current value of hexUnicode



83
84
85
# File 'lib/ipwho.rb', line 83

def hexUnicode
  @hexUnicode
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



83
84
85
# File 'lib/ipwho.rb', line 83

def name
  @name
end

#namePluralObject

Returns the value of attribute namePlural

Returns:

  • (Object)

    the current value of namePlural



83
84
85
# File 'lib/ipwho.rb', line 83

def namePlural
  @namePlural
end

#symbolObject

Returns the value of attribute symbol

Returns:

  • (Object)

    the current value of symbol



83
84
85
# File 'lib/ipwho.rb', line 83

def symbol
  @symbol
end

Class Method Details

.from_hash(hash) ⇒ Object



87
88
89
90
91
92
93
94
95
# File 'lib/ipwho.rb', line 87

def self.from_hash(hash)
  new(
    code:       hash["code"],
    symbol:     hash["symbol"],
    name:       hash["name"],
    namePlural: hash["name_plural"],
    hexUnicode: hash["hex_unicode"]
  )
end