Sha256: 37323f984901531ccac0c47e55850894cdfb5615d9d3223ccc9d9f6b02ce6ab1

Contents?: true

Size: 323 Bytes

Versions: 17

Compression:

Stored size: 323 Bytes

Contents

# frozen_string_literal: true

require 'json'

require_relative 'base'

module RubyNPM
  module Options
    module Values
      class Complex < Base
        def resolve
          @value
        end

        def render
          @value.is_a?(::String) ? @value : JSON.generate(value)
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
ruby_npm-0.2.0.pre.2 lib/ruby_npm/options/values/complex.rb
ruby_npm-0.2.0.pre.1 lib/ruby_npm/options/values/complex.rb
ruby_npm-0.1.0 lib/ruby_npm/options/values/complex.rb
ruby_npm-0.1.0.pre.14 lib/ruby_npm/options/values/complex.rb
ruby_npm-0.1.0.pre.13 lib/ruby_npm/options/values/complex.rb
ruby_npm-0.1.0.pre.12 lib/ruby_npm/options/values/complex.rb
ruby_npm-0.1.0.pre.11 lib/ruby_npm/options/values/complex.rb
ruby_npm-0.1.0.pre.10 lib/ruby_npm/options/values/complex.rb
ruby_npm-0.1.0.pre.9 lib/ruby_npm/options/values/complex.rb
ruby_npm-0.1.0.pre.8 lib/ruby_npm/options/values/complex.rb
ruby_npm-0.1.0.pre.7 lib/ruby_npm/options/values/complex.rb
ruby_npm-0.1.0.pre.6 lib/ruby_npm/options/values/complex.rb
ruby_npm-0.1.0.pre.5 lib/ruby_npm/options/values/complex.rb
ruby_npm-0.1.0.pre.4 lib/ruby_npm/options/values/complex.rb
ruby_npm-0.1.0.pre.3 lib/ruby_npm/options/values/complex.rb
ruby_npm-0.1.0.pre.2 lib/ruby_npm/options/values/complex.rb
ruby_npm-0.1.0.pre.1 lib/ruby_npm/options/values/complex.rb