lib/gamefic/props/default.rb in gamefic-3.1.0 vs lib/gamefic/props/default.rb in gamefic-3.2.0

- old
+ new

@@ -1,11 +1,9 @@ # frozen_string_literal: true module Gamefic module Props - SceneData = Struct.new(:name, :type) - # A collection of data related to a scene. Scenes define which Props class # they use. Props can be accessed in a scene's on_start and on_finish # callbacks. # # Props::Default includes the most common attributes that a scene requires. @@ -25,16 +23,16 @@ # # @return [Hash] attr_reader :context alias data context - # @return [SceneData] + # @return [Hash] attr_reader :scene # @param scene [Scene] # @param context [Hash] def initialize scene, **context - @scene = SceneData.new(scene.name, scene.type) + @scene = { name: scene.name, type: scene.type } @context = context end def prompt @prompt ||= '>'