Class: SimplerTiles::Style
- Inherits:
-
Object
- Object
- SimplerTiles::Style
- Includes:
- PP
- Defined in:
- lib/simpler_tiles/style.rb,
ext/simpler_tiles/style.c
Overview
Each style defines a particular directive for styling the map. For a list of keys and arguments refer to the simple-tiles documentation.
Instance Method Summary collapse
-
#arg ⇒ String
Get the arg for this Style.
-
#arg=(arg) ⇒ String
Set the arg for this Style.
-
#initialize(key, arg) ⇒ Style
constructor
Construct a new style.
-
#key ⇒ String
Get the key for this Style.
-
#key=(key) ⇒ String
Set the key for this Style.
Methods included from PP
Constructor Details
#initialize(key, arg) ⇒ Style
Construct a new style
8 9 10 11 |
# File 'lib/simpler_tiles/style.rb', line 8 def initialize(key, arg) self.key = key self.arg = arg end |
Instance Method Details
#arg ⇒ String
Get the arg for this Style.
57 58 59 60 61 62 63 |
# File 'ext/simpler_tiles/style.c', line 57 static VALUE get_arg(VALUE self){ simplet_style_t *style = get_style(self); char *arg; simplet_style_get_arg(style, &arg); return rb_str_new2(arg); } |
#arg=(arg) ⇒ String
Set the arg for this Style.
43 44 45 46 47 48 49 |
# File 'ext/simpler_tiles/style.c', line 43 static VALUE set_arg(VALUE self, VALUE arg){ Check_Type(arg, T_STRING); simplet_style_t *style = get_style(self); simplet_style_set_arg(style, RSTRING_PTR(arg)); return arg; } |
#key ⇒ String
Get the key for this Style.
85 86 87 88 89 90 91 |
# File 'ext/simpler_tiles/style.c', line 85 static VALUE get_key(VALUE self){ simplet_style_t *style = get_style(self); char *key; simplet_style_get_key(style, &key); return rb_str_new2(key); } |
#key=(key) ⇒ String
Set the key for this Style.
71 72 73 74 75 76 77 |
# File 'ext/simpler_tiles/style.c', line 71 static VALUE set_key(VALUE self, VALUE key){ Check_Type(key, T_STRING); simplet_style_t *style = get_style(self); simplet_style_set_key(style, RSTRING_PTR(key)); return key; } |