Class: Makiri::XML::Namespace
- Inherits:
-
Object
- Object
- Makiri::XML::Namespace
- Defined in:
- ext/makiri/glue/ruby_xml_node.c
Instance Method Summary collapse
- #==(other) ⇒ Object
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
- #href ⇒ Object
- #inspect ⇒ Object
- #prefix ⇒ Object
- #to_s ⇒ Object
Instance Method Details
#==(other) ⇒ Object
169 170 171 172 173 174 175 |
# File 'ext/makiri/glue/ruby_xml_node.c', line 169
static VALUE
mkr_ns_equal(VALUE self, VALUE other)
{
if (!rb_obj_is_kind_of(other, mkr_cXmlNamespace)) return Qfalse;
return (rb_equal(mkr_ns_prefix(self), mkr_ns_prefix(other)) &&
rb_equal(mkr_ns_href(self), mkr_ns_href(other))) ? Qtrue : Qfalse;
}
|
#eql?(other) ⇒ Boolean
169 170 171 172 173 174 175 |
# File 'ext/makiri/glue/ruby_xml_node.c', line 169
static VALUE
mkr_ns_equal(VALUE self, VALUE other)
{
if (!rb_obj_is_kind_of(other, mkr_cXmlNamespace)) return Qfalse;
return (rb_equal(mkr_ns_prefix(self), mkr_ns_prefix(other)) &&
rb_equal(mkr_ns_href(self), mkr_ns_href(other))) ? Qtrue : Qfalse;
}
|
#hash ⇒ Object
177 178 179 180 181 |
# File 'ext/makiri/glue/ruby_xml_node.c', line 177
static VALUE
mkr_ns_hash(VALUE self)
{
return rb_funcall(rb_ary_new3(2, mkr_ns_prefix(self), mkr_ns_href(self)), rb_intern("hash"), 0);
}
|
#href ⇒ Object
167 |
# File 'ext/makiri/glue/ruby_xml_node.c', line 167 static VALUE mkr_ns_href(VALUE self) { return rb_ivar_get(self, rb_intern("@href")); } |
#inspect ⇒ Object
183 184 185 186 187 188 |
# File 'ext/makiri/glue/ruby_xml_node.c', line 183
static VALUE
mkr_ns_inspect(VALUE self)
{
return rb_sprintf("#<Makiri::XML::Namespace prefix=%" PRIsVALUE " href=%" PRIsVALUE ">",
rb_inspect(mkr_ns_prefix(self)), rb_inspect(mkr_ns_href(self)));
}
|
#prefix ⇒ Object
166 |
# File 'ext/makiri/glue/ruby_xml_node.c', line 166 static VALUE mkr_ns_prefix(VALUE self) { return rb_ivar_get(self, rb_intern("@prefix")); } |
#to_s ⇒ Object
167 |
# File 'ext/makiri/glue/ruby_xml_node.c', line 167 static VALUE mkr_ns_href(VALUE self) { return rb_ivar_get(self, rb_intern("@href")); } |