Class: MonsterEngine::Config

Inherits:
Object
  • Object
show all
Defined in:
ext/monster_engine/monster_engine_config.c

Instance Method Summary collapse

Constructor Details

#initializeObject



25
26
27
28
29
# File 'ext/monster_engine/monster_engine_config.c', line 25

static VALUE initialize(VALUE self) {
  DATA_PTR(self) = monster_engine_config_new();
  rb_iv_set(self, "@workers", INT2FIX(1));
  return self;
}

Instance Method Details

#bindObject



31
32
33
# File 'ext/monster_engine/monster_engine_config.c', line 31

static VALUE get_bind(VALUE self) {
  return rb_str_new2(monster_engine_config_get_bind(DATA_PTR(self)));
}

#bind=(rb_bind) ⇒ Object



35
36
37
38
# File 'ext/monster_engine/monster_engine_config.c', line 35

static VALUE set_bind(VALUE self, VALUE rb_bind) {
  monster_engine_config_set_bind(DATA_PTR(self), StringValueCStr(rb_bind));
  return Qnil;
}

#workersObject



40
41
42
# File 'ext/monster_engine/monster_engine_config.c', line 40

static VALUE get_workers(VALUE self) {
  return rb_iv_get(self, "@workers");
}

#workers=(rb_workers) ⇒ Object



44
45
46
# File 'ext/monster_engine/monster_engine_config.c', line 44

static VALUE set_workers(VALUE self, VALUE rb_workers) {
  return rb_iv_set(self, "@workers", rb_workers);
}