module AyeCommander::Ivar::Writeable
Helps a command respond to methods that would be writers
Public Instance Methods
method_missing(name, *args)
click to toggle source
Any method that ends with an equal sign will be able to be handled by this method missing.
Calls superclass method
# File lib/aye_commander/ivar.rb, line 86 def method_missing(name, *args) if name[-1] == self.class.eq var_name = to_ivar(name[0...-1]) instance_variable_set var_name, args.first self.class.uses name[0...-1] else super end rescue NameError super end
Private Instance Methods
respond_to_missing?(name, *args)
click to toggle source
Calls superclass method
# File lib/aye_commander/ivar.rb, line 100 def respond_to_missing?(name, *args) name[-1] == self.class.eq || super end