Class: Katana::NamespaceRule

Inherits:
Object
  • Object
show all
Defined in:
ext/katana/rb_katana_rule.c

Instance Method Summary collapse

Instance Method Details

#prefixString?

Returns:

  • (String, nil)


102
103
104
105
106
107
108
109
110
# File 'ext/katana/rb_katana_rule.c', line 102

VALUE rb_namespace_rule_prefix(VALUE self)
{
  KatanaNamespaceRule *c_rule;
  Data_Get_Struct(self, KatanaNamespaceRule, c_rule);
  if (c_rule->prefix)
    return UTF8_STR_NEW(c_rule->prefix);
  else
    return Qnil;
}

#uriString?

Returns:

  • (String, nil)


115
116
117
118
119
120
121
122
123
# File 'ext/katana/rb_katana_rule.c', line 115

VALUE rb_namespace_rule_uri(VALUE self)
{
  KatanaNamespaceRule *c_rule;
  Data_Get_Struct(self, KatanaNamespaceRule, c_rule);
  if (c_rule->prefix)
    return UTF8_STR_NEW(c_rule->uri);
  else
    return Qnil;
}