Sha256: 2cb6c266d9f3cbbf30239864a301e8edce0d08594e8e0ed26403a216f28ac392

Contents?: true

Size: 728 Bytes

Versions: 8

Compression:

Stored size: 728 Bytes

Contents

require 'gamefic'
require 'gamefic-sdk/platform'
require 'gamefic-sdk/plot_config'
require 'gamefic-sdk/debug'
require 'gamefic-sdk/version'

module Gamefic::Sdk
  HTML_TEMPLATE_PATH = File.realpath(File.dirname(__FILE__) + "/../html/")
  GLOBAL_SCRIPT_PATH = File.realpath(File.dirname(__FILE__) + "/../scripts/")
  # @deprecated
  GLOBAL_IMPORT_PATH = GLOBAL_SCRIPT_PATH
  LIB_PATH = File.dirname(__FILE__)
end

class Class
  def descendants
    result = []
    ObjectSpace.each_object(::Class) {|klass| result << klass if klass < self }
    result
  end
end

class Entity
  def self.names
    result = []
    Entity.descendants.each { |e| result << e.to_s.split('::').last }
    result
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
gamefic-sdk-1.4.1 lib/gamefic-sdk.rb
gamefic-sdk-1.4.0 lib/gamefic-sdk.rb
gamefic-sdk-1.3.1 lib/gamefic-sdk.rb
gamefic-sdk-1.3.0 lib/gamefic-sdk.rb
gamefic-sdk-1.2.0 lib/gamefic-sdk.rb
gamefic-sdk-1.1.0 lib/gamefic-sdk.rb
gamefic-sdk-1.0.1 lib/gamefic-sdk.rb
gamefic-sdk-1.0.0 lib/gamefic-sdk.rb