mirror of
https://github.com/ubicloud/ubicloud.git
synced 2025-10-05 06:12:09 +08:00
14 lines
301 B
Ruby
14 lines
301 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Serializers::VmInitScript < Serializers::Base
|
|
def self.serialize_internal(vm_init_script, options = {})
|
|
h = {
|
|
id: vm_init_script.ubid,
|
|
name: vm_init_script.name
|
|
}
|
|
|
|
h[:script] = vm_init_script.script if options[:detailed]
|
|
|
|
h
|
|
end
|
|
end
|