Top Level Namespace

Defined Under Namespace

Modules: CommandInitializationMethods, DatabaseConnectionHelpers, Databases, Enumerable, EventConstants, EventInitializationMethods, Inform, Java, Kernel, LoggerHelpers, Logging, ObjectSpace, PrivateCommandMethods, PrivateEventMethods, PublicCommandMethods, PublicEventMethods, Sequel, SequelLoggers, SequelPlugins, SessionManagementMethods, SessionStateManagementMethods Classes: Array, Class, EmptyImmutableEnumerable, EphemeralCache, ExtendedProperties, FalseClass, Hash, Integer, LinkSetup, Logger, MethodAlreadyDefined, ModularizedSetup, Module, ModuleSetup, NilClass, Numeric, Object, ObjectSetup, Persistence, Proc, Set, String, Symbol, TagSetup, TaggedSetup, Time, TrueClass

Constant Summary collapse

JavaStackTracePattern =
%r{(org[/.]+(java|jruby)|method_missing)}.freeze
JoinedTemplate =
'%<str>s%<other>s'.freeze
ObjectIdentityTemplate =
'#<%<klass>s:%<name>s:0x%<hex>x:%<id>d>'.freeze
ObjectIdentityAttributes =
%i[name].freeze
AttributeTemplate =
'@%<key>s=%<value>s'.freeze
CommaSpaceString =
', '.freeze
ListCommaTemplate =
'%<str>s, %<other>s %<last>s'.freeze
ListSansCommaTemplate =
'%<str>s, %<other>s %<last>s'.freeze
SentenceTemplate =
'%<str>s %<other>s %<last>s'.freeze
WORDSIZE =

Simulate compiling with Z-code only compiler

(2**((0.size * 8) - 2) - 1)

Instance Method Summary collapse

Instance Method Details

#Object(name, klass = Inform::Object, &block) ⇒ Object

defined?(Sequel::Migration)



53
54
55
56
57
58
# File 'lib/runtime/object.rb', line 53

def Object(name, klass = Inform::Object, &block)
  obj = klass.fetch_or_create_by_name(name)
  obj.with(&block) if block_given?
  obj.save_changes
  obj
end