File: config_null.rb

package info (click to toggle)
ruby-hocon 1.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 768 kB
  • sloc: ruby: 7,903; makefile: 4
file content (33 lines) | stat: -rw-r--r-- 501 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# encoding: utf-8

require_relative '../../hocon/impl'
require_relative '../../hocon/config_value_type'

class Hocon::Impl::ConfigNull
  include Hocon::Impl::AbstractConfigValue

  def initialize(origin)
    super(origin)
  end

  def value_type
    Hocon::ConfigValueType::NULL
  end

  def unwrapped
    nil
  end

  def transform_to_string
    "null"
  end

  def render_value_to_sb(sb, indent, at_root, options)
    sb << "null"
  end

  def new_copy(origin)
    self.class.new(origin)
  end

end