Class: E621::Container

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

Direct Known Subclasses

Pool, Post, Set

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/container.rb', line 22

def method_missing(method)
  if instance_variables.include?("@#{method}".to_sym) then
    return instance_variable_get("@#{method}")
  else
    raise NoMethodError, "undefined method #{method} for #{self.class}"
  end
end