Class: ServerVariable

Inherits:
Object
  • Object
show all
Defined in:
lib/tiki/server.rb

Instance Method Summary collapse

Constructor Details

#initialize(default = nil, **named) ⇒ ServerVariable

Returns a new instance of ServerVariable.



10
11
12
13
# File 'lib/tiki/server.rb', line 10

def initialize(default = nil, **named)
  @default = default
  named_props named
end

Instance Method Details

#to_specObject



15
16
17
18
19
# File 'lib/tiki/server.rb', line 15

def to_spec
  @default = @default&.to_s
  @enum&.map!(&:to_s)
  scalar_props
end