Class: Viglink::IndustryType

Inherits:
Struct
  • Object
show all
Defined in:
lib/viglink/industry_type.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



4
5
6
# File 'lib/viglink/industry_type.rb', line 4

def code
  @code
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



4
5
6
# File 'lib/viglink/industry_type.rb', line 4

def name
  @name
end

Class Method Details

.from_json(industry_type) ⇒ Object



5
6
7
# File 'lib/viglink/industry_type.rb', line 5

def self.from_json(industry_type)
  new code: industry_type['code'], name: industry_type['name']
end