Class: Fitting::Report::Response
- Inherits:
-
Object
- Object
- Fitting::Report::Response
- Defined in:
- lib/fitting/report/response.rb
Instance Method Summary collapse
-
#initialize(name, routes) ⇒ Response
constructor
A new instance of Response.
- #save ⇒ Object
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
#save ⇒ Object
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 |