Class: Riddl::Handlers::PlainType

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby/riddl/handlers/plain-type.rb

Class Method Summary collapse

Class Method Details

.handle(what, hinfo) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/ruby/riddl/handlers/plain-type.rb', line 4

def self::handle(what,hinfo)
  if what.class == Riddl::Parameter::Tempfile
    w = what.read
  else  
    w = what
  end  
  begin
    re = Regexp.new(hinfo)
  rescue  
    return false
  end
  w =~ re
end