Class: Orenono::DslModel
- Inherits:
-
Object
- Object
- Orenono::DslModel
- Defined in:
- lib/orenono_dsl_model.rb
Overview
DslModel
Instance Attribute Summary collapse
-
#decrement ⇒ Object
decrement command.
-
#display ⇒ Object
display command.
-
#end_loop ⇒ Object
end_loop command.
-
#increment ⇒ Object
increment command.
-
#next_cursol ⇒ Object
next_cursol command.
-
#previous_cursol ⇒ Object
previous_cursol command.
-
#read ⇒ Object
read command.
-
#start_loop ⇒ Object
start_loop command.
Instance Method Summary collapse
Instance Attribute Details
#decrement ⇒ Object
decrement command
10 11 12 |
# File 'lib/orenono_dsl_model.rb', line 10 def decrement @decrement end |
#display ⇒ Object
display command
20 21 22 |
# File 'lib/orenono_dsl_model.rb', line 20 def display @display end |
#end_loop ⇒ Object
end_loop command
14 15 16 |
# File 'lib/orenono_dsl_model.rb', line 14 def end_loop @end_loop end |
#increment ⇒ Object
increment command
8 9 10 |
# File 'lib/orenono_dsl_model.rb', line 8 def increment @increment end |
#next_cursol ⇒ Object
next_cursol command
16 17 18 |
# File 'lib/orenono_dsl_model.rb', line 16 def next_cursol @next_cursol end |
#previous_cursol ⇒ Object
previous_cursol command
18 19 20 |
# File 'lib/orenono_dsl_model.rb', line 18 def previous_cursol @previous_cursol end |
#read ⇒ Object
read command
22 23 24 |
# File 'lib/orenono_dsl_model.rb', line 22 def read @read end |
#start_loop ⇒ Object
start_loop command
12 13 14 |
# File 'lib/orenono_dsl_model.rb', line 12 def start_loop @start_loop end |
Instance Method Details
#default_syntaxes ⇒ Object
31 32 33 |
# File 'lib/orenono_dsl_model.rb', line 31 def default_syntaxes %w(+ - [ ] > < . ,) end |
#syntaxes ⇒ Object
24 25 26 27 28 29 |
# File 'lib/orenono_dsl_model.rb', line 24 def syntaxes [ @increment, @decrement, @start_loop, @end_loop, @next_cursol, @previous_cursol, @display, @read ] end |
#token_patterns ⇒ Object
35 36 37 38 39 40 |
# File 'lib/orenono_dsl_model.rb', line 35 def token_patterns instance_variables.map do |key| sap_key = instance_variable_get(key) '+.[]'.split('').include?(sap_key) ? "\\#{sap_key}" : sap_key end.join('|') end |