Class: SyoboiCalendar::ResponseParsers::BaseResponseParser

Inherits:
Object
  • Object
show all
Defined in:
lib/syoboi_calendar/response_parsers/base_response_parser.rb

Instance Method Summary collapse

Constructor Details

#initialize(body) ⇒ BaseResponseParser

Returns a new instance of BaseResponseParser.

Parameters:

  • body (String)


5
6
7
# File 'lib/syoboi_calendar/response_parsers/base_response_parser.rb', line 5

def initialize(body)
  @body = body
end

Instance Method Details

#parseArray<SyoboiCalendar::Resources::BaseResource>



10
11
12
13
14
# File 'lib/syoboi_calendar/response_parsers/base_response_parser.rb', line 10

def parse
  sources.map do |source|
    resource_class.new(source)
  end
end