Class: Ppson::JsonArgument

Inherits:
Object
  • Object
show all
Defined in:
lib/ppjson/json_argument.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, options) ⇒ JsonArgument

Returns a new instance of JsonArgument.



5
6
7
8
# File 'lib/ppjson/json_argument.rb', line 5

def initialize(data, options)
  @data = data
  @options = options
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



3
4
5
# File 'lib/ppjson/json_argument.rb', line 3

def data
  @data
end

#optionsObject (readonly)

Returns the value of attribute options.



3
4
5
# File 'lib/ppjson/json_argument.rb', line 3

def options
  @options
end

Instance Method Details

#processObject



10
11
12
# File 'lib/ppjson/json_argument.rb', line 10

def process
  Ppjson::StreamJsonWriter.new.write(data, :pretty => true)
end