class CTioga2::MetaBuilder::Types::StringOrRegexpParameter
A String
or a regular expression
Public Instance Methods
string_to_type_internal(str)
click to toggle source
# File lib/ctioga2/metabuilder/types/strings.rb, line 70 def string_to_type_internal(str) if str =~ /^\/(.*)\/$/ return Regexp.new($1) else return str end end
type_name()
click to toggle source
# File lib/ctioga2/metabuilder/types/strings.rb, line 66 def type_name return 'regexp' end
type_to_string(val)
click to toggle source
# File lib/ctioga2/metabuilder/types/strings.rb, line 78 def type_to_string(val) if val.is_a? String return val else return "/#{val}/" end end