Class: Katana::SupportsRule
- Inherits:
-
Object
- Object
- Katana::SupportsRule
- Defined in:
- ext/katana/rb_katana_rule.c
Instance Method Summary collapse
Instance Method Details
#expression ⇒ Object
83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'ext/katana/rb_katana_rule.c', line 83 VALUE rb_supports_exp(VALUE self) { KatanaSupportsRule *c_rule; Data_Get_Struct(self, KatanaSupportsRule, c_rule); if (c_rule->exp) { VALUE exp = Data_Wrap_Struct(rb_SupportsExp, NULL, NULL, c_rule->exp); return exp; } else return Qnil; } |
#rules ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'ext/katana/rb_katana_rule.c', line 65 VALUE rb_supports_rules(VALUE self) { KatanaSupportsRule *c_rule; Data_Get_Struct(self, KatanaSupportsRule, c_rule); if (c_rule->rules) { VALUE array = Data_Wrap_Struct(rb_KArray, NULL, NULL, c_rule->rules); VALUE sing = rb_singleton_class(array); rb_define_method(sing, "each", rb_rule_each, 0); return array; } else return Qnil; } |