Class: Code::Parser::Name
Instance Method Summary collapse
- #ampersand ⇒ Object
- #asterisk ⇒ Object
- #character ⇒ Object
- #closing_curly_bracket ⇒ Object
- #closing_parenthesis ⇒ Object
- #closing_square_bracket ⇒ Object
- #colon ⇒ Object
- #comma ⇒ Object
- #do_keyword ⇒ Object
- #dot ⇒ Object
- #double_quote ⇒ Object
- #else_keyword ⇒ Object
- #elsif_keyword ⇒ Object
- #end_keyword ⇒ Object
- #equal ⇒ Object
- #greater ⇒ Object
- #lesser ⇒ Object
- #newline ⇒ Object
- #opening_curly_bracket ⇒ Object
- #opening_parenthesis ⇒ Object
- #opening_square_bracket ⇒ Object
- #pipe ⇒ Object
- #root ⇒ Object
- #separator ⇒ Object
- #single_quote ⇒ Object
- #space ⇒ Object
- #special_character ⇒ Object
Instance Method Details
#ampersand ⇒ Object
66 67 68 |
# File 'lib/code/parser/name.rb', line 66 def ampersand str("&") end |
#asterisk ⇒ Object
78 79 80 |
# File 'lib/code/parser/name.rb', line 78 def asterisk str("*") end |
#character ⇒ Object
106 107 108 |
# File 'lib/code/parser/name.rb', line 106 def character special_character.absent << any end |
#closing_curly_bracket ⇒ Object
30 31 32 |
# File 'lib/code/parser/name.rb', line 30 def closing_curly_bracket str("}") end |
#closing_parenthesis ⇒ Object
46 47 48 |
# File 'lib/code/parser/name.rb', line 46 def closing_parenthesis str(")") end |
#closing_square_bracket ⇒ Object
38 39 40 |
# File 'lib/code/parser/name.rb', line 38 def closing_square_bracket str("]") end |
#colon ⇒ Object
22 23 24 |
# File 'lib/code/parser/name.rb', line 22 def colon str(":") end |
#comma ⇒ Object
14 15 16 |
# File 'lib/code/parser/name.rb', line 14 def comma str(",") end |
#do_keyword ⇒ Object
82 83 84 |
# File 'lib/code/parser/name.rb', line 82 def do_keyword str("do") end |
#dot ⇒ Object
58 59 60 |
# File 'lib/code/parser/name.rb', line 58 def dot str(".") end |
#double_quote ⇒ Object
54 55 56 |
# File 'lib/code/parser/name.rb', line 54 def double_quote str('"') end |
#else_keyword ⇒ Object
94 95 96 |
# File 'lib/code/parser/name.rb', line 94 def else_keyword str("else") end |
#elsif_keyword ⇒ Object
90 91 92 |
# File 'lib/code/parser/name.rb', line 90 def elsif_keyword str("elsif") end |
#end_keyword ⇒ Object
86 87 88 |
# File 'lib/code/parser/name.rb', line 86 def end_keyword str("end") end |
#equal ⇒ Object
18 19 20 |
# File 'lib/code/parser/name.rb', line 18 def equal str("=") end |
#greater ⇒ Object
74 75 76 |
# File 'lib/code/parser/name.rb', line 74 def greater str(">") end |
#lesser ⇒ Object
70 71 72 |
# File 'lib/code/parser/name.rb', line 70 def lesser str("<") end |
#newline ⇒ Object
10 11 12 |
# File 'lib/code/parser/name.rb', line 10 def newline str("\n") end |
#opening_curly_bracket ⇒ Object
26 27 28 |
# File 'lib/code/parser/name.rb', line 26 def opening_curly_bracket str("{") end |
#opening_parenthesis ⇒ Object
42 43 44 |
# File 'lib/code/parser/name.rb', line 42 def opening_parenthesis str("(") end |
#opening_square_bracket ⇒ Object
34 35 36 |
# File 'lib/code/parser/name.rb', line 34 def opening_square_bracket str("[") end |
#pipe ⇒ Object
62 63 64 |
# File 'lib/code/parser/name.rb', line 62 def pipe str("|") end |
#root ⇒ Object
114 115 116 117 118 119 |
# File 'lib/code/parser/name.rb', line 114 def root (do_keyword << separator).absent << ( else_keyword << separator ).absent << (elsif_keyword << separator).absent << (end_keyword << separator).absent << character.repeat(1) end |
#separator ⇒ Object
110 111 112 |
# File 'lib/code/parser/name.rb', line 110 def separator special_character | any.absent end |
#single_quote ⇒ Object
50 51 52 |
# File 'lib/code/parser/name.rb', line 50 def single_quote str("'") end |
#space ⇒ Object
6 7 8 |
# File 'lib/code/parser/name.rb', line 6 def space str(" ") end |
#special_character ⇒ Object
98 99 100 101 102 103 104 |
# File 'lib/code/parser/name.rb', line 98 def special_character ampersand | equal | pipe | dot | colon | comma | space | newline | opening_curly_bracket | closing_curly_bracket | opening_parenthesis | closing_parenthesis | opening_square_bracket | closing_square_bracket | single_quote | double_quote | lesser | greater | asterisk end |