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_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
-
#initialize(json_string) ⇒ Object
Initializes the language If json_string is not a Hash {}, it will surroud the json with { “base_name”} = json_string.
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
21 22 23 |
# File 'lib/jaspion/kilza/language.rb', line 21 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_words ⇒ Object
Words that will receive an undescore before property name
18 19 20 |
# File 'lib/jaspion/kilza/language.rb', line 18 def reserved_words @reserved_words end |
#types ⇒ Object
Hash table with all language types mapped to target language
24 25 26 |
# File 'lib/jaspion/kilza/language.rb', line 24 def types @types end |
Instance Method Details
#initialize(json_string) ⇒ Object
Initializes the language If json_string is not a Hash {}, it will surroud the json with { “base_name”} = json_string
32 33 34 35 36 37 38 |
# File 'lib/jaspion/kilza/language.rb', line 32 def initialize(json_string) @json_string = json_string @classes = [] @types = {} @reserved_words = [] @equal_keys = [] end |