Class: Verified::Passport

Inherits:
Object
  • Object
show all
Defined in:
lib/verified/passport.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &blk) ⇒ Object (private)



9
10
11
12
13
14
15
# File 'lib/verified/passport.rb', line 9

def method_missing(name, *args, &blk)
  if args.empty? && blk.nil? && @data.has_key?(name.to_s)
    @data[name.to_s]
  else
    super
  end
end

Instance Method Details

#verified?Boolean

Returns:

  • (Boolean)


18
19
20
21
# File 'lib/verified/passport.rb', line 18

def verified?
  return true if @data != false
  return false
end