Class: Symbol
Instance Method Summary
collapse
#&, #action, #and?, #cast, #filter, #list, #merge, #not!, #one_or_more, #optional, #override, #parse, #predicate?, #protect, #repeat, #set, #skip, #tag_error, #tag_result, #validate, #zero_or_more, #|
Instance Method Details
#from_instance_variable ⇒ Object
20
21
22
23
24
25
26
|
# File 'lib/mod_symbol.rb', line 20
def from_instance_variable
if self[0] == '@'
self[1..-1].to_sym
else
self
end
end
|
#to_instance_variable ⇒ Object
12
13
14
15
16
17
18
|
# File 'lib/mod_symbol.rb', line 12
def to_instance_variable
if self[0] == '@'
self
else
:"@#{self}"
end
end
|