Class: Fitting::Report::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/fitting/report/response.rb

Instance Method Summary collapse

Constructor Details

#initialize(name, routes) ⇒ Response

Returns a new instance of Response.



6
7
8
9
# File 'lib/fitting/report/response.rb', line 6

def initialize(name, routes)
  @name = name
  @json = routes.to_hash
end

Instance Method Details

#saveObject



11
12
13
14
15
# File 'lib/fitting/report/response.rb', line 11

def save
  File.open(@name, 'w') do |file|
    file.write(YAML.dump(@json))
  end
end