Class: RPM::Require

Inherits:
Dependency show all
Defined in:
ext/rpm/dependency.c

Instance Method Summary collapse

Methods inherited from Dependency

#eq?, #flags, #flagstag, #ge?, #gt?, #le?, #lt?, #name, #nametag, #owner, #satisfy?, #version, #versiontag

Constructor Details

#initialize(name, version, flags, owner) ⇒ Object



53
54
55
56
57
58
59
60
61
62
# File 'ext/rpm/dependency.c', line 53

static VALUE
require_initialize(VALUE dep, VALUE name, VALUE version,
            VALUE flags, VALUE owner)
{
  dependency_initialize(dep,name,version,flags,owner);
  rb_ivar_set(dep, id_nametag, INT2NUM(RPMTAG_REQUIRENAME));
  rb_ivar_set(dep, id_versiontag, INT2NUM(RPMTAG_REQUIREVERSION));
  rb_ivar_set(dep, id_flagstag, INT2NUM(RPMTAG_REQUIREFLAGS));
  return dep;
}

Instance Method Details

#pre?Boolean

Returns true if this is a pre-requires.

Returns:

  • (Boolean)

    true if this is a pre-requires



321
322
323
324
325
# File 'ext/rpm/dependency.c', line 321

VALUE
rpm_require_is_pre(VALUE req)
{
  return (NUM2INT(rb_ivar_get(req, id_flags)) & RPMSENSE_PREREQ) ? Qtrue : Qfalse;
}