Class: MailBuilder::BindingHelper

Inherits:
Object
  • Object
show all
Includes:
SimpleRenderingHelper
Defined in:
lib/mail_builder.rb

Instance Method Summary collapse

Methods included from SimpleRenderingHelper

included

Instance Method Details

#add_attribute(key, value) ⇒ Object



133
134
135
136
# File 'lib/mail_builder.rb', line 133

def add_attribute key,value
  self.class.__send__(:attr_accessor, "#{key}")
  self.__send__("#{key}=", value)
end

#binding_forObject



129
130
131
# File 'lib/mail_builder.rb', line 129

def binding_for
  binding
end

#set_locals(hash) ⇒ Object



138
139
140
141
142
# File 'lib/mail_builder.rb', line 138

def set_locals hash
  hash.each do |key,value|
    add_attribute(key,value)
  end
end