module ActiveBuilder::ClassMethod

Public Instance Methods

attributes(attribute) click to toggle source
# File lib/active_builder.rb, line 9
def attributes(attribute)
  attr_accessor attribute
  method_name = "with_#{attribute}".to_sym
  define_method(method_name) do |value|
    send("#{attribute}=", value)
    self
  end
end