Class: VpsAdminOS::Converter::User

Inherits:
Object
  • Object
show all
Defined in:
lib/vpsadminos-converter/user.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, ugid, uid_map, gid_map) ⇒ User

Returns a new instance of User



10
11
12
13
14
15
# File 'lib/vpsadminos-converter/user.rb', line 10

def initialize(name, ugid, uid_map, gid_map)
  @name = name
  @ugid = ugid
  @uid_map = uid_map
  @gid_map = gid_map
end

Instance Attribute Details

#gid_mapObject

Returns the value of attribute gid_map



8
9
10
# File 'lib/vpsadminos-converter/user.rb', line 8

def gid_map
  @gid_map
end

#nameObject

Returns the value of attribute name



8
9
10
# File 'lib/vpsadminos-converter/user.rb', line 8

def name
  @name
end

#ugidObject

Returns the value of attribute ugid



8
9
10
# File 'lib/vpsadminos-converter/user.rb', line 8

def ugid
  @ugid
end

#uid_mapObject

Returns the value of attribute uid_map



8
9
10
# File 'lib/vpsadminos-converter/user.rb', line 8

def uid_map
  @uid_map
end

Class Method Details

.defaultObject



3
4
5
6
# File 'lib/vpsadminos-converter/user.rb', line 3

def self.default
  map = ['0:666000:65536']
  new('default', 1000, map, map)
end

Instance Method Details

#dump_configObject



17
18
19
20
21
22
23
# File 'lib/vpsadminos-converter/user.rb', line 17

def dump_config
  {
    'ugid' => ugid,
    'uid_map' => uid_map,
    'gid_map' => gid_map,
  }
end