Class: Cindy::Variable

Inherits:
Object
  • Object
show all
Defined in:
lib/cindy/variable.rb

Constant Summary collapse

TAG_NAME =
self.name.split('::').last.downcase
TYPES =
public_methods.inject([]) do |ret,v|
    ret << $' if v =~ /\Aparse_/
    ret
end

Class Method Summary collapse

Class Method Details

.parse_boolean(string) ⇒ Object



6
7
8
# File 'lib/cindy/variable.rb', line 6

def parse_boolean(string)
    'true' == string
end

.parse_command(string) ⇒ Object



14
15
16
# File 'lib/cindy/variable.rb', line 14

def parse_command(string)
    Command.new string
end

.parse_int(string) ⇒ Object



18
19
20
# File 'lib/cindy/variable.rb', line 18

def parse_int(string)
    string.to_i
end

.parse_string(string) ⇒ Object



10
11
12
# File 'lib/cindy/variable.rb', line 10

def parse_string(string)
    string
end