Sha256: 5fd7db110bfa09184bafd7393757667e46296cca343900710b3a0d774fb0acd1
Contents?: true
Size: 440 Bytes
Versions: 11
Compression:
Stored size: 440 Bytes
Contents
module RakutenWebService class GenreInformation attr_reader :parent, :current, :children def initialize(params, genre_class) @parent = Array(params['parent']).first @parent = genre_class.new(@parent) if @parent @current = Array(params['current']).first @current = genre_class.new(@current) if @current @children = params['children'].map { |child| genre_class.new(child['child']) } end end end
Version data entries
11 entries across 11 versions & 1 rubygems