Class: TrueClass

Inherits:
Object
  • Object
show all
Defined in:
lib/sinatra/params/bool.rb

Class Method Summary collapse

Class Method Details

.convert_to(type) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/sinatra/params/bool.rb', line 4

def self.convert_to(type)
    table = {
        TrueClass => :itself,
        Boolean => :itself,
        String => :to_s
    }

    table[type]
end