Class: Mandoc::Node
- Inherits:
-
Object
- Object
- Mandoc::Node
- Defined in:
- ext/mandoc/rb_mandoc.c
Direct Known Subclasses
BlockNode, BodyNode, CommentNode, EQNNode, ElemNode, HeadNode, RootNode, TBLNode, TailNode, TextNode
Instance Method Summary collapse
-
#body ⇒ Object
:call-seq: body -> Node or nil.
-
#column ⇒ Object
:call-seq: column -> Integer.
-
#first_child ⇒ Object
:call-seq: first_child -> Node or nil.
-
#head ⇒ Object
:call-seq: head -> Node or nil.
-
#last_child ⇒ Object
:call-seq: last_child -> Node or nil.
-
#line ⇒ Object
:call-seq: line -> Integer.
-
#name ⇒ Object
:call-seq: name -> String.
-
#next_sibling ⇒ Object
:call-seq: next_sibling -> Node or nil.
-
#parent ⇒ Object
:call-seq: parent -> Node or nil.
-
#prev_sibling ⇒ Object
:call-seq: prev_sibling -> Node or nil.
-
#tag ⇒ Object
:call-seq: tag -> String or nil.
-
#tail ⇒ Object
:call-seq: tail -> Node or nil.
-
#text ⇒ Object
:call-seq: text -> String or nil.
Instance Method Details
#body ⇒ Object
:call-seq:
body -> Node or nil
524 525 526 527 528 529 |
# File 'ext/mandoc/rb_mandoc.c', line 524
static VALUE
rb_node_m_body (VALUE self)
{
struct roff_node *node = RTYPEDDATA_DATA (self);
return node->body ? rb_wrap_node (node->body) : RUBY_Qnil;
}
|
#column ⇒ Object
:call-seq:
column -> Integer
579 580 581 582 583 584 |
# File 'ext/mandoc/rb_mandoc.c', line 579
static VALUE
rb_node_m_column (VALUE self)
{
struct roff_node *node = RTYPEDDATA_DATA (self);
return rb_int2num_inline (node->pos);
}
|
#first_child ⇒ Object
:call-seq:
first_child -> Node or nil
469 470 471 472 473 474 |
# File 'ext/mandoc/rb_mandoc.c', line 469
static VALUE
rb_node_m_first_child (VALUE self)
{
struct roff_node *node = RTYPEDDATA_DATA (self);
return node->child ? rb_wrap_node (node->child) : RUBY_Qnil;
}
|
#head ⇒ Object
:call-seq:
head -> Node or nil
513 514 515 516 517 518 |
# File 'ext/mandoc/rb_mandoc.c', line 513
static VALUE
rb_node_m_head (VALUE self)
{
struct roff_node *node = RTYPEDDATA_DATA (self);
return node->head ? rb_wrap_node (node->head) : RUBY_Qnil;
}
|
#last_child ⇒ Object
:call-seq:
last_child -> Node or nil
480 481 482 483 484 485 |
# File 'ext/mandoc/rb_mandoc.c', line 480
static VALUE
rb_node_m_last_child (VALUE self)
{
struct roff_node *node = RTYPEDDATA_DATA (self);
return node->last ? rb_wrap_node (node->last) : RUBY_Qnil;
}
|
#line ⇒ Object
:call-seq:
line -> Integer
568 569 570 571 572 573 |
# File 'ext/mandoc/rb_mandoc.c', line 568
static VALUE
rb_node_m_line (VALUE self)
{
struct roff_node *node = RTYPEDDATA_DATA (self);
return rb_int2num_inline (node->line);
}
|
#name ⇒ Object
:call-seq:
name -> String
590 591 592 593 594 595 |
# File 'ext/mandoc/rb_mandoc.c', line 590
static VALUE
rb_node_m_name (VALUE self)
{
struct roff_node *node = RTYPEDDATA_DATA (self);
return rb_usascii_str_new_cstr (roff_name[node->tok]);
}
|
#next_sibling ⇒ Object
:call-seq:
next_sibling -> Node or nil
491 492 493 494 495 496 |
# File 'ext/mandoc/rb_mandoc.c', line 491
static VALUE
rb_node_m_next_sibling (VALUE self)
{
struct roff_node *node = RTYPEDDATA_DATA (self);
return node->next ? rb_wrap_node (node->next) : RUBY_Qnil;
}
|
#parent ⇒ Object
:call-seq:
parent -> Node or nil
458 459 460 461 462 463 |
# File 'ext/mandoc/rb_mandoc.c', line 458
static VALUE
rb_node_m_parent (VALUE self)
{
struct roff_node *node = RTYPEDDATA_DATA (self);
return node->parent ? rb_wrap_node (node->parent) : RUBY_Qnil;
}
|
#prev_sibling ⇒ Object
:call-seq:
prev_sibling -> Node or nil
502 503 504 505 506 507 |
# File 'ext/mandoc/rb_mandoc.c', line 502
static VALUE
rb_node_m_prev_sibling (VALUE self)
{
struct roff_node *node = RTYPEDDATA_DATA (self);
return node->prev ? rb_wrap_node (node->prev) : RUBY_Qnil;
}
|
#tag ⇒ Object
:call-seq:
tag -> String or nil
557 558 559 560 561 562 |
# File 'ext/mandoc/rb_mandoc.c', line 557
static VALUE
rb_node_m_tag (VALUE self)
{
struct roff_node *node = RTYPEDDATA_DATA (self);
return node->string ? rb_str_new_cstr (node->tag) : RUBY_Qnil;
}
|
#tail ⇒ Object
:call-seq:
tail -> Node or nil
535 536 537 538 539 540 |
# File 'ext/mandoc/rb_mandoc.c', line 535
static VALUE
rb_node_m_tail (VALUE self)
{
struct roff_node *node = RTYPEDDATA_DATA (self);
return node->tail ? rb_wrap_node (node->tail) : RUBY_Qnil;
}
|
#text ⇒ Object
:call-seq:
text -> String or nil
546 547 548 549 550 551 |
# File 'ext/mandoc/rb_mandoc.c', line 546
static VALUE
rb_node_m_text (VALUE self)
{
struct roff_node *node = RTYPEDDATA_DATA (self);
return node->string ? rb_str_new_cstr (node->string) : RUBY_Qnil;
}
|