Module: Jaspion::Kilza::Language
Overview
Represents an program language
Instance Attribute Summary collapse
-
#base_name ⇒ Object
Name used to represent the first generated class.
-
#classes(base_name) ⇒ Array
Returns all available classes.
-
#equal_keys ⇒ Object
Array with all properties that will be used to compare other objects.
-
#json_string ⇒ Object
JSON that will be used to generate objects.
-
#reserved_delimiter ⇒ Object
String that will be used to prefix reserved words.
-
#reserved_words ⇒ Object
Words that will receive an undescore before property name.
-
#types ⇒ Object
Hash table with all language types mapped to target language.
Instance Method Summary collapse
Instance Attribute Details
#base_name ⇒ Object
Name used to represent the first generated class
12 13 14 |
# File 'lib/jaspion/kilza/language.rb', line 12 def base_name @base_name end |
#classes(base_name) ⇒ Array
Returns all available classes
9 10 11 |
# File 'lib/jaspion/kilza/language.rb', line 9 def classes @classes end |
#equal_keys ⇒ Object
Array with all properties that will be used to compare other objects
24 25 26 |
# File 'lib/jaspion/kilza/language.rb', line 24 def equal_keys @equal_keys end |
#json_string ⇒ Object
JSON that will be used to generate objects
15 16 17 |
# File 'lib/jaspion/kilza/language.rb', line 15 def json_string @json_string end |
#reserved_delimiter ⇒ Object
String that will be used to prefix reserved words
18 19 20 |
# File 'lib/jaspion/kilza/language.rb', line 18 def reserved_delimiter @reserved_delimiter end |
#reserved_words ⇒ Object
Words that will receive an undescore before property name
21 22 23 |
# File 'lib/jaspion/kilza/language.rb', line 21 def reserved_words @reserved_words end |
#types ⇒ Object
Hash table with all language types mapped to target language
27 28 29 |
# File 'lib/jaspion/kilza/language.rb', line 27 def types @types end |
Instance Method Details
#initialize(json_string) ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/jaspion/kilza/language.rb', line 29 def initialize(json_string) @json_string = json_string @classes = [] @types = {} @reserved_words = [] @reserved_delimiter = '_' @equal_keys = [] end |