Class: IMW::Serializer::JsonSerializer

Inherits:
Object
  • Object
show all
Defined in:
lib/imw/serializer/json_serializer.rb

Instance Method Summary collapse

Constructor Details

#initialize(file_url, mode) ⇒ JsonSerializer

Returns a new instance of JsonSerializer.



5
6
7
8
9
# File 'lib/imw/serializer/json_serializer.rb', line 5

def initialize file_url, mode
  @file_url = file_url
  @mode     = mode
  File.open(file_url, mode)
end

Instance Method Details

#write(line) ⇒ Object



11
12
13
# File 'lib/imw/serializer/json_serializer.rb', line 11

def write line
  File.write(line)
end