Class: GreenPepper::TypeBase
- Inherits:
-
Object
- Object
- GreenPepper::TypeBase
show all
- Defined in:
- lib/greenpepper/converter.rb
Class Method Summary
collapse
Class Method Details
.can_parse?(str) ⇒ Boolean
83
84
85
|
# File 'lib/greenpepper/converter.rb', line 83
def self.can_parse?(str)
regex === str
end
|
87
88
89
|
# File 'lib/greenpepper/converter.rb', line 87
def self.format
Proc.new{|object,expected_format| object.to_s}
end
|
.inherited(subclass) ⇒ Object
79
80
81
|
# File 'lib/greenpepper/converter.rb', line 79
def TypeBase.inherited(subclass)
TypeConverter.instance.add_conversion_type subclass
end
|