Class: Openalias::CryptoAddress

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/openalias.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *args, &block) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/openalias.rb', line 8

def method_missing(method_name, *args, &block)
  if symbol = method_name[/(.*)\?\z/, 1]
    self.cryptocurrency.to_s.downcase === symbol.to_s.downcase
  else
    super
  end
end