Class: Katana::Declaration
- Inherits:
-
Object
- Object
- Katana::Declaration
- Defined in:
- ext/katana/rb_katana_declaration.c
Instance Method Summary collapse
- #important ⇒ Boolean
- #position ⇒ SourcePosition
- #property ⇒ String?
- #values ⇒ Katana::Array<Katana::Value>?
Instance Method Details
#important ⇒ Boolean
24 25 26 27 28 29 30 31 32 |
# File 'ext/katana/rb_katana_declaration.c', line 24 VALUE rb_declaration_important(VALUE self) { KatanaDeclaration *c_decl; Data_Get_Struct(self, KatanaDeclaration, c_decl); if (c_decl->important) return Qtrue; else return Qfalse; } |
#position ⇒ SourcePosition
58 59 60 61 62 63 |
# File 'ext/katana/rb_katana_declaration.c', line 58 VALUE rb_declaration_position(VALUE self) { KatanaDeclaration *c_decl; Data_Get_Struct(self, KatanaDeclaration, c_decl); return Data_Wrap_Struct(rb_KPosition, NULL, NULL, &c_decl->position); } |
#property ⇒ String?
11 12 13 14 15 16 17 18 19 |
# File 'ext/katana/rb_katana_declaration.c', line 11 VALUE rb_declaration_prop(VALUE self) { KatanaDeclaration *c_decl; Data_Get_Struct(self, KatanaDeclaration, c_decl); if (c_decl->property) return UTF8_STR_NEW(c_decl->property); else Qnil; } |
#values ⇒ Katana::Array<Katana::Value>?
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'ext/katana/rb_katana_declaration.c', line 37 VALUE rb_declaration_values(VALUE self) { KatanaDeclaration *c_declaration; Data_Get_Struct(self, KatanaDeclaration, c_declaration); if (c_declaration->values) { VALUE array = Data_Wrap_Struct(rb_KArray, NULL, NULL, c_declaration->values); VALUE sing = rb_singleton_class(array); rb_define_method(sing, "each", rb_value_each, 0); return array; } else return Qnil; } |