Class: Mandoc::Meta
- Inherits:
-
Object
- Object
- Mandoc::Meta
- Defined in:
- ext/mandoc/rb_mandoc.c
Instance Method Summary collapse
-
#arch ⇒ Object
:call-seq: arch -> String or nil.
-
#date ⇒ Object
:call-seq: date -> String.
-
#deroff ⇒ Object
:call-seq: deroff -> String.
-
#first_node ⇒ Object
:call-seq: first_node -> Node.
-
#has_body? ⇒ Boolean
:call-seq: has_body? -> false or true.
-
#name ⇒ Object
:call-seq: name -> String.
-
#os ⇒ Object
:call-seq: os -> String.
-
#section ⇒ Object
:call-seq: section -> String.
-
#so_target ⇒ Object
:call-seq: so_target -> String or nil.
-
#title ⇒ Object
:call-seq: title -> String.
-
#volume ⇒ Object
:call-seq: volume -> String.
Instance Method Details
#arch ⇒ Object
:call-seq:
arch -> String or nil
183 184 185 186 187 188 |
# File 'ext/mandoc/rb_mandoc.c', line 183
static VALUE
rb_meta_m_arch (VALUE self)
{
struct roff_meta *meta = RTYPEDDATA_DATA (self);
return meta->arch ? rb_str_new_cstr (meta->arch) : RUBY_Qnil;
}
|
#date ⇒ Object
:call-seq:
date -> String
216 217 218 219 220 221 |
# File 'ext/mandoc/rb_mandoc.c', line 216
static VALUE
rb_meta_m_date (VALUE self)
{
struct roff_meta *meta = RTYPEDDATA_DATA (self);
return rb_str_new_cstr (meta->date);
}
|
#deroff ⇒ Object
:call-seq:
deroff -> String
134 135 136 137 138 139 140 141 142 143 144 |
# File 'ext/mandoc/rb_mandoc.c', line 134
static VALUE
rb_meta_m_deroff (VALUE self)
{
struct roff_meta *meta = RTYPEDDATA_DATA (self);
char *text = NULL;
deroff (&text, meta->first);
VALUE str
= rb_str_new_cstr (text); /* user's responsibility to decide encoding */
free (text);
return str;
}
|
#first_node ⇒ Object
:call-seq:
first_node -> Node
428 429 430 431 432 433 |
# File 'ext/mandoc/rb_mandoc.c', line 428
static VALUE
rb_meta_m_first_node (VALUE self)
{
struct roff_meta *meta = RTYPEDDATA_DATA (self);
return rb_wrap_node (meta->first);
}
|
#has_body? ⇒ Boolean
:call-seq:
has_body? -> false or true
238 239 240 241 242 243 |
# File 'ext/mandoc/rb_mandoc.c', line 238
static VALUE
rb_meta_m_has_body (VALUE self)
{
struct roff_meta *meta = RTYPEDDATA_DATA (self);
return meta->hasbody ? RUBY_Qtrue : RUBY_Qfalse;
}
|
#name ⇒ Object
:call-seq:
name -> String
205 206 207 208 209 210 |
# File 'ext/mandoc/rb_mandoc.c', line 205
static VALUE
rb_meta_m_name (VALUE self)
{
struct roff_meta *meta = RTYPEDDATA_DATA (self);
return rb_str_new_cstr (meta->name);
}
|
#os ⇒ Object
:call-seq:
os -> String
172 173 174 175 176 177 |
# File 'ext/mandoc/rb_mandoc.c', line 172
static VALUE
rb_meta_m_os (VALUE self)
{
struct roff_meta *meta = RTYPEDDATA_DATA (self);
return rb_str_new_cstr (meta->os);
}
|
#section ⇒ Object
:call-seq:
section -> String
150 151 152 153 154 155 |
# File 'ext/mandoc/rb_mandoc.c', line 150
static VALUE
rb_meta_m_section (VALUE self)
{
struct roff_meta *meta = RTYPEDDATA_DATA (self);
return rb_str_new_cstr (meta->msec);
}
|
#so_target ⇒ Object
:call-seq:
so_target -> String or nil
227 228 229 230 231 232 |
# File 'ext/mandoc/rb_mandoc.c', line 227
static VALUE
rb_meta_m_so_target (VALUE self)
{
struct roff_meta *meta = RTYPEDDATA_DATA (self);
return meta->sodest ? rb_str_new_cstr (meta->sodest) : RUBY_Qnil;
}
|
#title ⇒ Object
:call-seq:
title -> String
194 195 196 197 198 199 |
# File 'ext/mandoc/rb_mandoc.c', line 194
static VALUE
rb_meta_m_title (VALUE self)
{
struct roff_meta *meta = RTYPEDDATA_DATA (self);
return rb_str_new_cstr (meta->title);
}
|
#volume ⇒ Object
:call-seq:
volume -> String
161 162 163 164 165 166 |
# File 'ext/mandoc/rb_mandoc.c', line 161
static VALUE
rb_meta_m_volume (VALUE self)
{
struct roff_meta *meta = RTYPEDDATA_DATA (self);
return rb_str_new_cstr (meta->vol);
}
|