Sha256: d761bdb0df5542e319bd0f853cb00ea7c88f90780208aa431c27a897982c9a65

Contents?: true

Size: 721 Bytes

Versions: 1

Compression:

Stored size: 721 Bytes

Contents

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

module Gamefic::Sdk
  autoload :Server, 'gamefic-sdk/server'

  HTML_TEMPLATE_PATH = File.realpath(File.dirname(__FILE__) + "/../html/")
  GLOBAL_SCRIPT_PATH = File.realpath(File.dirname(__FILE__) + "/../scripts/")
  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 Gamefic::Entity
  def self.names
    result = []
    Entity.descendants.each { |e| result << e.to_s.split('::').last }
    result
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gamefic-sdk-1.6.0 lib/gamefic-sdk.rb