Class: SyoboiCalendar::ResponseParsers::BaseResponseParser
- Inherits:
-
Object
- Object
- SyoboiCalendar::ResponseParsers::BaseResponseParser
- Defined in:
- lib/syoboi_calendar/response_parsers/base_response_parser.rb
Direct Known Subclasses
ChannelGroupsResponseParser, ChannelsResponseParser, ProgramsResponseParser, TitlesResponseParser
Instance Method Summary collapse
-
#initialize(body) ⇒ BaseResponseParser
constructor
A new instance of BaseResponseParser.
- #parse ⇒ Array<SyoboiCalendar::Resources::BaseResource>
Constructor Details
#initialize(body) ⇒ BaseResponseParser
Returns a new instance of BaseResponseParser.
5 6 7 |
# File 'lib/syoboi_calendar/response_parsers/base_response_parser.rb', line 5 def initialize(body) @body = body end |
Instance Method Details
#parse ⇒ Array<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 |