Class: RS::TransportType

Inherits:
Object
  • Object
show all
Defined in:
lib/rs/dict.rb

Overview

ტრანსპორტირების ტიპი

Constant Summary collapse

VEHICLE =
1
RAILWAY =
2
AIR =
3
OTHERS =
4
NAMES =
{ VEHICLE => 'საავტომობილო', RAILWAY => 'სარკინიგზო', AIR => 'საავიაციო', OTHERS => 'სხვა' }

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#idObject

Returns the value of attribute id.



54
55
56
# File 'lib/rs/dict.rb', line 54

def id
  @id
end

#nameObject

Returns the value of attribute name.



54
55
56
# File 'lib/rs/dict.rb', line 54

def name
  @name
end

Class Method Details

.create_from_id(id) ⇒ Object



56
57
58
59
60
61
# File 'lib/rs/dict.rb', line 56

def self.create_from_id(id)
  type = TransportType.new
  type.id = id
  type.name = NAMES[id]
  type
end